/* ==========================================================================
   Assessment Page Styles
   ========================================================================== */

.assessment-hero {
  padding: calc(72px + var(--space-16)) 0 var(--space-16);
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

.assessment-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at top right, rgba(249, 115, 22, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.assessment-hero-content {
  position: relative;
  max-width: 700px;
}

.assessment-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.assessment-label-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.assessment-hero h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .assessment-hero h1 {
    font-size: var(--font-size-6xl);
  }
}

.assessment-hero-description {
  font-size: var(--font-size-xl);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.assessment-hero-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
}

/* Assessment Section */
.assessment-section {
  padding: var(--space-16) 0 var(--space-32);
  background: var(--color-bg-elevated);
  min-height: 60vh;
}

/* Assessment Steps */
.assessment-step {
  animation: fadeInUp 0.4s ease;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border-radius: 50%;
}

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

.assessment-step h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
}

.step-description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-group input[type="email"],
.form-group input[type="text"] {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.form-group input::placeholder {
  color: var(--color-text-subtle);
}

/* Role Cards */
.role-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
  .role-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .role-cards--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
}

.role-card:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
  transform: translateY(-2px);
}

.role-card:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.role-card--featured {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.02));
}

.role-card--featured .role-track {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.role-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  color: white;
}

.role-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.role-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.role-track {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Consent */
.consent-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.consent-option:hover {
  border-color: var(--color-border-light);
}

.consent-option.is-invalid {
  border-color: #ef4444;
}

.consent-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.consent-option input[type="checkbox"]:checked {
  border-color: var(--color-accent);
  background: var(--color-accent);
  /* Checkmark drawn with a background image so it works without extra markup. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2309090B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.consent-option input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.consent-text {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.consent-text a {
  color: var(--color-accent);
  text-decoration: underline;
}

.consent-error {
  margin: calc(var(--space-6) * -1 + var(--space-2)) 0 var(--space-6);
  font-size: var(--font-size-sm);
  color: #ef4444;
}

/* Tool Cards */
.tool-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
  .tool-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .tool-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-base);
}

.tool-card:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
  transform: translateY(-2px);
}

.tool-card:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.tool-card.is-selected {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.02));
}

.tool-name {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
}

.tool-vendor {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
}

.tool-other-group {
  margin-bottom: var(--space-6);
}

/* Questions */
.questions-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.question-group {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.question-label {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-option:hover {
  border-color: var(--color-border-light);
  background: var(--color-bg-hover);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-light);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.radio-option input[type="radio"]:checked {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 3px var(--color-bg);
}

.radio-option:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(249, 115, 22, 0.05);
}

.radio-text {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

.radio-option:has(input:checked) .radio-text {
  color: var(--color-text);
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Results */
.results-container {
  text-align: center;
}

.results-header {
  margin-bottom: var(--space-12);
}

.results-header h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-8);
}

.score-circle {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-6);
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.5s ease-out;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#score-number {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.score-max {
  font-size: var(--font-size-xl);
  color: var(--color-text-muted);
}

.score-label {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-accent);
}

/* Skills Breakdown */
.results-breakdown {
  text-align: left;
  margin-bottom: var(--space-10);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.results-breakdown h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.skill-name {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  min-width: 140px;
}

.skill-bar {
  flex: 2;
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

.skill-fill.low {
  background: #ef4444;
}

.skill-fill.medium {
  background: #eab308;
}

.skill-fill.high {
  background: #22c55e;
}

.skill-score {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  min-width: 40px;
  text-align: right;
}

/* Recommendations */
.results-recommendations {
  text-align: left;
  margin-bottom: var(--space-10);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.results-recommendations h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

.recommendations-content p {
  font-size: var(--font-size-base);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.recommendations-content ul {
  list-style: none;
  padding: 0;
}

.recommendations-content li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.recommendations-content li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  margin-top: 0.5em;
  flex-shrink: 0;
}

/* Results CTA */
.results-cta {
  padding: var(--space-8);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-xl);
  text-align: center;
}

.results-cta h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

.results-cta p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Button sizing & mobile refinements (scoped to the assessment)
   ========================================================================== */

/* The assessment reuses the site-wide .btn--large, which is oversized for a
   multi-step form. Tighten it here — without shrinking the homepage CTAs. */
.assessment-section .btn--large {
  padding: 0.875rem 1.75rem;
  font-size: var(--font-size-base);
}

.assessment-section .btn--primary {
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.assessment-section .btn svg {
  width: 16px;
  height: 16px;
}

/* Mobile: stack the step navigation and let the primary actions span the full
   width — comfortable tap targets and no horizontal overflow on narrow phones. */
@media (max-width: 639px) {
  .assessment-step h2 {
    font-size: var(--font-size-2xl);
  }

  .step-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--space-3);
  }

  .assessment-form .btn--large,
  .step-actions .btn {
    width: 100%;
  }
}
