﻿/* =========================================
   survey.css — KCL x NØRD Private Intake
   ========================================= */

body.survey-body {
  background: #020c1c;
  min-height: 100vh;
  color: #dde6f5;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Layout ---- */
.survey-main {
  padding-top: 6rem;
  padding-bottom: 5rem;
  min-height: 100vh;
}

/* ---- Landing hero ---- */
.survey-hero {
  padding: 3.5rem 0 2rem;
}

.survey-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--np-gold, #b88a45);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.survey-main-title {
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  font-weight: 700;
  color: #edf3ff;
  line-height: 1.15;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.survey-main-desc {
  color: #7a96bc;
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 1.6rem;
  max-width: 760px;
}

.survey-hero .survey-main-title,
.survey-hero .survey-main-desc {
  margin-inline: auto;
}

.survey-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #445f7a;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 100px;
  padding: 0.45rem 1.2rem;
}

.survey-badges .sep {
  color: #2a3f5f;
}

/* ---- Intake cards ---- */
.intake-card {
  background: linear-gradient(150deg, #071c3a 0%, #0b2547 100%);
  border: 1px solid rgba(184, 138, 69, 0.18);
  border-radius: 1.1rem;
  padding: 2.2rem 2rem;
  height: 100%;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.intake-card:hover {
  border-color: rgba(184, 138, 69, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.intake-card-icon {
  font-size: 2.2rem;
  color: var(--np-gold, #b88a45);
  margin-bottom: 1.2rem;
}

.intake-card h3 {
  color: #edf3ff;
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.intake-card p {
  color: #7a96bc;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.intake-card-sub {
  font-size: 0.82rem !important;
  color: #445f7a !important;
  font-style: italic;
  margin-bottom: 0 !important;
}

/* ---- Step header bar ---- */
.step-header {
  background: rgba(3, 14, 31, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 138, 69, 0.12);
  padding: 1rem 0 0.8rem;
  position: sticky;
  top: 56px;
  z-index: 90;
}

.step-progress-bar-wrap {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--np-gold, #b88a45), #e8c97a);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 16.67%;
}

/* ---- Step indicators ---- */
.step-indicators {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  max-width: 120px;
  position: relative;
  cursor: default;
}

.step-dot:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
  z-index: 0;
}

.step-dot.completed:not(:last-child)::after {
  background: rgba(184, 138, 69, 0.3);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #445f7a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.step-dot.active .step-num {
  background: var(--np-gold, #b88a45);
  border-color: var(--np-gold, #b88a45);
  color: #020c1c;
}

.step-dot.completed .step-num {
  background: rgba(184, 138, 69, 0.15);
  border-color: rgba(184, 138, 69, 0.5);
  color: var(--np-gold, #b88a45);
}

.step-dot.completed .step-num::after {
  content: "✓";
  font-size: 0.62rem;
}

.step-dot.completed .step-num span {
  display: none;
}

.step-label {
  font-size: 0.6rem;
  color: #445f7a;
  text-align: center;
  max-width: 80px;
  line-height: 1.25;
  display: none;
}

@media (min-width: 576px) {
  .step-label {
    display: block;
  }
}

.step-dot.active .step-label {
  color: var(--np-gold, #b88a45);
}

.step-dot.completed .step-label {
  color: #5a7898;
}

/* ---- Step content panels ---- */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: surveyFadeUp 0.4s ease;
}

@keyframes surveyFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Section title ---- */
.step-section-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--np-gold, #b88a45);
  border: 1px solid rgba(184, 138, 69, 0.3);
  border-radius: 100px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.7rem;
}

.step-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #edf3ff;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.step-section-desc {
  font-size: 0.87rem;
  color: #7a96bc;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ---- Question card ---- */
.question-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.8rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
}

.question-label {
  font-size: 0.91rem;
  font-weight: 600;
  color: #c8d8f0;
  margin-bottom: 1rem;
  line-height: 1.55;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.question-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(184, 138, 69, 0.15);
  color: var(--np-gold, #b88a45);
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.question-hint {
  font-size: 0.78rem;
  color: #445f7a;
  font-style: italic;
  margin-bottom: 0.8rem;
  margin-top: -0.5rem;
}

/* ---- Survey option (radio/checkbox) ---- */
.survey-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  margin-bottom: 0.4rem;
  color: #7a96bc;
  font-size: 0.87rem;
  line-height: 1.45;
}

.survey-option:hover {
  border-color: rgba(184, 138, 69, 0.35);
  background: rgba(184, 138, 69, 0.05);
  color: #c8d8f0;
}

.survey-option:has(input:checked) {
  border-color: rgba(184, 138, 69, 0.55);
  background: rgba(184, 138, 69, 0.08);
  color: #edf3ff;
}

.survey-option input[type="radio"],
.survey-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--np-gold, #b88a45);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

/* ---- Scale 1–5 ---- */
.scale-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scale-label-min,
.scale-label-max {
  font-size: 0.72rem;
  color: #445f7a;
  white-space: nowrap;
  max-width: 90px;
  line-height: 1.2;
}

.scale-label-min { text-align: right; }
.scale-label-max { text-align: left; }

.scale-options {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  justify-content: center;
}

.scale-btn {
  width: 44px;
  height: 44px;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7a96bc;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-btn:hover {
  border-color: rgba(184, 138, 69, 0.45);
  background: rgba(184, 138, 69, 0.07);
  color: var(--np-gold, #b88a45);
}

.scale-btn.selected {
  background: var(--np-gold, #b88a45);
  border-color: var(--np-gold, #b88a45);
  color: #020c1c;
  font-weight: 800;
}

/* ---- Matrix (importance table) ---- */
.matrix-wrap {
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 420px;
}

.matrix-table th {
  padding: 0.5rem 0.6rem;
  color: var(--np-gold, #b88a45);
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  white-space: nowrap;
}

.matrix-table th:first-child {
  text-align: left;
  width: 45%;
}

.matrix-table td {
  padding: 0.65rem 0.6rem;
  color: #7a96bc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.matrix-table td:first-child {
  color: #c8d8f0;
  line-height: 1.4;
}

.matrix-table td:not(:first-child) {
  text-align: center;
}

.matrix-table input[type="radio"] {
  accent-color: var(--np-gold, #b88a45);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ---- Textarea & inputs ---- */
.survey-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.5rem;
  color: #c8d8f0;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 110px;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.survey-textarea:focus {
  outline: none;
  border-color: rgba(184, 138, 69, 0.45);
  background: rgba(184, 138, 69, 0.03);
}

.survey-textarea::placeholder {
  color: #354f6a;
}

.survey-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.5rem;
  color: #c8d8f0;
  padding: 0.72rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.survey-input:focus {
  outline: none;
  border-color: rgba(184, 138, 69, 0.45);
  background: rgba(184, 138, 69, 0.03);
}

.survey-input::placeholder {
  color: #354f6a;
}

.contact-field {
  margin-bottom: 1.1rem;
}

.contact-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a96bc;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ---- Navigation buttons ---- */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

.step-counter-text {
  font-size: 0.78rem;
  color: #445f7a;
  text-align: center;
}

.btn-step-prev {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #7a96bc;
  padding: 0.65rem 1.4rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-step-prev:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #c8d8f0;
}

.btn-step-next {
  background: var(--np-gold, #b88a45);
  border: none;
  color: #020c1c;
  padding: 0.7rem 2rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-step-next:hover {
  background: #d6b37a;
}

/* ---- Intro card ---- */
.survey-intro-card {
  background: linear-gradient(150deg, #071c3a 0%, #0b2547 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1rem;
  padding: 2rem 2.2rem;
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
  color: #7a96bc;
  line-height: 1.8;
}

.survey-intro-card strong {
  color: #c8d8f0;
  display: block;
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

/* ---- Success screen ---- */
.survey-success {
  display: none;
  text-align: center;
  padding: 5rem 1rem;
  animation: none;
}

.survey-success.show {
  display: block;
  animation: surveyFadeUp 0.5s ease;
}

.success-icon {
  font-size: 3.8rem;
  color: var(--np-gold, #b88a45);
  margin-bottom: 1.5rem;
  display: block;
}

.success-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #edf3ff;
  margin-bottom: 0.8rem;
}

.success-desc {
  font-size: 0.95rem;
  color: #7a96bc;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ---- Validation states ---- */
.question-card.has-error {
  border-color: rgba(220, 80, 80, 0.55) !important;
  background: rgba(220, 80, 80, 0.04);
  animation: shakeCard 0.35s ease;
}

@keyframes shakeCard {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.survey-error-msg {
  color: #e07070;
  font-size: 0.78rem;
  margin: 0.6rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.survey-error-msg::before {
  content: "⚠";
  font-size: 0.75rem;
}

.survey-input.is-invalid,
.survey-textarea.is-invalid {
  border-color: rgba(220, 80, 80, 0.6) !important;
  background: rgba(220, 80, 80, 0.05);
}

/* ---- Validation toast ---- */
.survey-validation-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 20, 20, 0.94);
  border: 1px solid rgba(220, 80, 80, 0.45);
  color: #f0b0b0;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  animation: toastSlideUp 0.25s ease;
  transition: opacity 0.4s;
}

.survey-validation-toast.fade-out { opacity: 0; }

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
  .scale-btn {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  .question-card {
    padding: 1.1rem 1rem;
  }

  .intake-card {
    padding: 1.5rem 1.2rem;
  }

  .step-nav {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .step-counter-text {
    order: -1;
    width: 100%;
    text-align: center;
  }

  .btn-step-next,
  .btn-step-prev {
    flex: 1;
  }
}
