/* ===================================================================
   Survey Tool — Leadership Maturity Assessment
   Design: authoritative, grounded, Cormorant Garamond + DM Sans
=================================================================== */

/* ── Layout ── */
.survey-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f5f0;
}

/* ── Survey nav ── */
.survey-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: #1a2e28;
  border-bottom: 2px solid #c8a45a;
}

.survey-topbar .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e8dcc8;
  letter-spacing: 0.03em;
}

.survey-topbar .brand .tm {
  font-size: 0.65em;
  vertical-align: super;
  font-style: italic;
  opacity: 0.6;
}

.survey-topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #c5b89a;
}

.survey-topbar .user-info .user-name {
  font-weight: 500;
  color: #e8dcc8;
}

/* ── Progress bar ── */
.progress-wrap {
  padding: 28px 40px 0;
  background: #1a2e28;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.progress-meta .domain-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8a45a;
  font-weight: 500;
}

.progress-meta .count-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #7a8e87;
}

.progress-track {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c8a45a 0%, #e8c97a 100%);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Main survey area ── */
.survey-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px 80px;
}

/* ── Auth card ── */
.auth-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 1px solid #ddd5c5;
  border-radius: 6px;
  padding: 40px 44px;
  box-shadow: 0 2px 16px rgba(26,46,40,0.08);
}

.auth-card .section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8a45a;
  font-weight: 500;
  margin-bottom: 10px;
}

.auth-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: #1a2e28;
  line-height: 1.2;
  margin: 0 0 6px;
}

.auth-card .subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #6a7d74;
  line-height: 1.5;
  margin-bottom: 32px;
}

.auth-card .form-row {
  margin-bottom: 18px;
}

.auth-card label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #3d5248;
  margin-bottom: 6px;
}

.auth-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cdc5b8;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: #1a2e28;
  background: #faf9f7;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  outline: none;
}

.auth-card input:focus {
  border-color: #c8a45a;
  box-shadow: 0 0 0 3px rgba(200,164,90,0.15);
  background: #fff;
}

.auth-card .form-error {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: -12px;
  margin-bottom: 14px;
  min-height: 20px;
}

.btn-primary {
  width: 100%;
  padding: 13px 24px;
  background: #1a2e28;
  color: #e8dcc8;
  border: none;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 6px;
}

.btn-primary:hover { background: #243d34; }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: transparent;
  border: 1.5px solid #cdc5b8;
  color: #3d5248;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-top: 16px;
}

.btn-secondary:hover { border-color: #1a2e28; color: #1a2e28; }

.auth-toggle {
  margin-top: 22px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #6a7d74;
}

.auth-toggle a {
  color: #1a2e28;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Question card ── */
.question-wrap {
  width: 100%;
  max-width: 640px;
}

.question-card {
  background: #fff;
  border: 1px solid #ddd5c5;
  border-radius: 6px;
  padding: 40px 44px 36px;
  box-shadow: 0 2px 16px rgba(26,46,40,0.06);
}

.question-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8a45a;
  font-weight: 500;
  margin-bottom: 16px;
}

.question-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a2e28;
  line-height: 1.55;
  margin-bottom: 32px;
}

.question-text .reverse-note {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: #9a7a4a;
  background: #fdf5e0;
  border: 1px solid #e8d49a;
  border-radius: 3px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
  font-style: italic;
}

/* ── Likert scale ── */
.likert-scale {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.likert-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.likert-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border: 2px solid #b8b0a0;
  border-radius: 50%;
  background: #faf9f7;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}

.likert-option input[type="radio"]:checked {
  border-color: #c8a45a;
  background: #c8a45a;
}

.likert-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.likert-option input[type="radio"]:hover {
  border-color: #c8a45a;
  box-shadow: 0 0 0 3px rgba(200,164,90,0.2);
}

.likert-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2e28;
  text-align: center;
  line-height: 1.2;
}

.likert-anchor {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: #9a8a7a;
  text-align: center;
  line-height: 1.2;
  margin-top: -4px;
}

/* ── Navigation buttons ── */
.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}

.btn-nav {
  padding: 11px 26px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
  border: 1.5px solid transparent;
}

.btn-nav.prev {
  background: transparent;
  border-color: #cdc5b8;
  color: #3d5248;
}

.btn-nav.prev:hover { border-color: #1a2e28; color: #1a2e28; }

.btn-nav.next {
  background: #1a2e28;
  color: #e8dcc8;
  border-color: #1a2e28;
}

.btn-nav.next:hover { background: #243d34; }
.btn-nav.next:active { transform: translateY(1px); }

.btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Report ── */
.report-wrap {
  width: 100%;
  max-width: 640px;
}

.report-card {
  background: #fff;
  border: 1px solid #ddd5c5;
  border-radius: 6px;
  padding: 48px 44px;
  box-shadow: 0 4px 24px rgba(26,46,40,0.1);
  text-align: center;
}

.report-card .report-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8a45a;
  font-weight: 500;
  margin-bottom: 20px;
}

.report-card .band-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #1a2e28;
  line-height: 1.2;
  margin-bottom: 14px;
}

.report-card .score-line {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #7a8e87;
  margin-bottom: 32px;
}

.report-card .score-line strong {
  color: #3d5248;
  font-weight: 600;
}

.report-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8a45a, transparent);
  margin: 0 auto 28px;
}

.report-description {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: #4a5e54;
  line-height: 1.65;
  margin-bottom: 32px;
}

.report-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-report-action {
  padding: 11px 24px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  border: 1.5px solid #1a2e28;
}

.btn-report-action.primary {
  background: #1a2e28;
  color: #e8dcc8;
  border-color: #1a2e28;
}

.btn-report-action.primary:hover { background: #243d34; }

.btn-report-action.secondary {
  background: transparent;
  color: #1a2e28;
}

.btn-report-action.secondary:hover { background: #f0ede6; }

/* ── Loading spinner ── */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(200,164,90,0.3);
  border-top-color: #c8a45a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

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

.loading-state {
  text-align: center;
  padding: 40px;
}

.loading-state p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #7a8e87;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .survey-topbar { padding: 14px 20px; }
  .progress-wrap { padding: 20px 20px 0; }
  .survey-stage { padding: 32px 16px 60px; }

  .auth-card,
  .question-card,
  .report-card { padding: 28px 22px; }

  .auth-card h1 { font-size: 1.6rem; }
  .question-text { font-size: 1.1rem; }

  .likert-scale { gap: 4px; }
  .likert-option input[type="radio"] { width: 22px; height: 22px; }
  .likert-label { font-size: 0.65rem; }

  .report-card .band-name { font-size: 1.7rem; }
  .report-actions { flex-direction: column; }
}

/* ── Fade-in animation ── */
.fade-in {
  animation: fadeIn 0.35s ease-out;
}

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

/* ── Flash error (form-level) ── */
.flash-error {
  background: #fdf3f3;
  border: 1px solid #f5c6c6;
  border-radius: 4px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #c0392b;
  margin-bottom: 18px;
  display: none;
}

.flash-error.show { display: block; }

/* ── Email delivery notice ── */
.email-notice {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #7a8e87;
  margin-bottom: 24px;
}
.email-notice strong { color: #3d5248; font-weight: 600; }