/* ================================================================
   STUDIOLINK — Intake Form CSS
   ================================================================ */

/* ── Page Layout ───────────────────────────────────────────────── */
.intake-page {
  min-height: 100vh;
  padding-top: 68px;
}

.intake-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* ── Progress Bar ──────────────────────────────────────────────── */
.progress-header {
  margin-bottom: 52px;
}

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

.progress-meta span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.progress-meta .step-count {
  color: var(--accent-2);
}

.progress-track {
  width: 100%;
  height: 3px;
  background: var(--surface-3);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 100px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  width: 33.33%;
}

.progress-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.progress-dot {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  transition: color 0.3s;
}

.progress-dot.active {
  color: var(--accent-2);
}

.progress-dot.done {
  color: var(--accent);
}

/* ── Steps ─────────────────────────────────────────────────────── */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: stepFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.step-header {
  margin-bottom: 40px;
}

.step-num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(108, 95, 255, 0.12);
  border: 1px solid rgba(108, 95, 255, 0.25);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.step-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.step-header p {
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ── Field Groups ──────────────────────────────────────────────── */
.field-group {
  display: grid;
  gap: 22px;
  margin-bottom: 8px;
}

.field-group--2 {
  grid-template-columns: 1fr 1fr;
}

.field-group + .field-group {
  margin-top: 4px;
}

@media (max-width: 560px) {
  .field-group--2 { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.field label .req {
  color: #f87171;
  margin-left: 3px;
}

.field input,
.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 12px 16px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  resize: vertical;
  -webkit-appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
  font-size: 0.9rem;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(108, 95, 255, 0.18);
}

.field textarea {
  min-height: 106px;
  line-height: 1.65;
}

.field textarea.tall {
  min-height: 140px;
}

.field input.error,
.field textarea.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60%  { transform: translateX(5px); }
}

/* ── Field Section ─────────────────────────────────────────────── */
.field-section {
  margin-top: 40px;
}

.field-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: block;
}

/* ── Radio Cards ───────────────────────────────────────────────── */
.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  position: relative;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-card__label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.radio-card__label:hover {
  border-color: rgba(108, 95, 255, 0.5);
  background: var(--surface-3);
}

.radio-card input[type="radio"]:checked + .radio-card__label {
  border-color: var(--accent);
  background: rgba(108, 95, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(108, 95, 255, 0.14), inset 0 0 0 1px rgba(108, 95, 255, 0.25);
}

.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.radio-card input[type="radio"]:checked + .radio-card__label .radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.radio-dot::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.radio-card input[type="radio"]:checked + .radio-card__label .radio-dot::after {
  opacity: 1;
}

.radio-card__text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.radio-card__text span {
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.5;
}

/* ── Pill Toggles ──────────────────────────────────────────────── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pill {
  position: relative;
}

.pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pill__label {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  transition: all 0.2s;
  user-select: none;
}

.pill__label:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-3);
}

.pill input[type="checkbox"]:checked + .pill__label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Conditional ───────────────────────────────────────────────── */
.field--conditional {
  display: none;
}

.field--conditional.visible {
  display: flex;
  animation: stepFadeIn 0.25s var(--ease-out) both;
}

/* ── Form Nav ──────────────────────────────────────────────────── */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.form-nav--end {
  justify-content: flex-end;
}

/* ── Thank You ─────────────────────────────────────────────────── */
.thankyou {
  display: none;
  text-align: center;
  padding: 100px 24px;
  max-width: 560px;
  margin: 0 auto;
  animation: stepFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.thankyou.visible {
  display: block;
}

.thankyou__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 36px;
  display: block;
}

.thankyou__icon .check-circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  animation: drawCircle 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.thankyou__icon .check-mark {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 55;
  stroke-dashoffset: 55;
  animation: drawCheck 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.thankyou h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.thankyou__body {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}

.thankyou__sub {
  font-size: 0.9rem;
  color: var(--text-3);
}

.thankyou__sub a {
  color: var(--accent-2);
  transition: color 0.2s;
}

.thankyou__sub a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .intake-wrap { padding: 40px 20px 80px; }
  .form-nav { flex-wrap: wrap; }
  .form-nav .btn--lg { width: 100%; justify-content: center; }
}
