/* Progressbar */

.form-progress {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: var(--s3) 0;
}

.form-progress-inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: 0 var(--s5);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.progress-track {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* Form page layout */

.form-page {
  min-height: calc(100vh - 57px);
  display: flex;
  flex-direction: column;
}

.form-content {
  flex: 1;
  padding-top: var(--s8);
  padding-bottom: var(--s10);
}

.form-header {
  margin-bottom: var(--s7);
}

.form-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: var(--s3);
}

.form-desc {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
}

/* Fields */

.form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
}

@media (min-width: 540px) {
  .field-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Radio group */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease);
}

.radio-option:hover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-option input[type="radio"]:checked ~ span {
  font-weight: 500;
}

.radio-option:has(input:checked) {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

/* Checkbox */

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.checkbox-option span {
  font-size: 0.9375rem;
  color: var(--fg);
  line-height: 1.5;
}

.checkbox-option a {
  color: var(--accent);
}

/* Error */

.form-error {
  padding: var(--s3) var(--s4);
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius);
  color: var(--negative);
  font-size: 0.9375rem;
  margin-bottom: var(--s5);
}

/* Actions */

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s8);
  padding-top: var(--s6);
  border-top: 1px solid var(--line);
}

/* Infobox */

.infobox {
  background: var(--accent-soft);
  border: 1px solid #e8c4a8;
  border-radius: var(--radius);
  padding: var(--s5);
  margin-bottom: var(--s6);
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.infobox strong {
  color: var(--fg);
}

/* Section divider inside form */

.form-section-title {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s5);
}

/* Vision step — spesiell visuell behandling */

.form-step-vision .form-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.form-step-vision .vision-intro {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: var(--s8);
  max-width: 50ch;
}

.form-step-vision .form-fields {
  gap: var(--s8);
}

.form-step-vision .field label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  font-optical-sizing: auto;
}

.vision-north-star-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s2);
}

.vision-north-star-wrap .north-star-prefix {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
}

.vision-north-star-wrap .input {
  flex: 1;
  min-width: 200px;
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  padding-left: var(--s2);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
}

.vision-north-star-wrap .input:focus {
  border-bottom-color: var(--accent);
  outline: none;
}

/* Vision closing message */

.vision-closing {
  background: var(--bg-dark);
  color: var(--fg-on-dark-muted);
  border-radius: var(--radius-lg);
  padding: var(--s6);
  margin-top: var(--s7);
  font-size: 1rem;
  line-height: 1.7;
}

.vision-closing strong {
  color: var(--fg-on-dark);
}
