/* ──────────────────────────────────────────────────────────────────────
   Long-form intake forms (Apply for Counseling, etc.)
   Standalone form-page layout. Calm centered hero, single-column form
   at 680px max, numbered section markers, polished controls.
   ────────────────────────────────────────────────────────────────────── */

:root {
  --lf-paper:        #faf6ef;
  --lf-paper-soft:   #f4ede0;
  --lf-ink:          #1f1d18;
  --lf-ink-soft:     #5b554a;
  --lf-rule:         #e0d6c2;
  --lf-rule-soft:    #ebe3d2;
  --lf-ochre:        #b8741f;
  --lf-ochre-deep:   #8c5414;
  --lf-error:        #a8362a;
}

/* The hero is rendered with the standard SEP hero classes (sep-hero,
   sep-eyebrow-line, sep-title, sep-deck, sep-pubmeta) for visual
   consistency with every other page on the site. forms.css only handles
   the form body below the hero. */

.form-page-body {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2rem) clamp(4rem, 7vw, 6rem);
  color: var(--lf-ink);
}
.form-page-body-wide {
  max-width: 820px;
}

/* HTML instructional block (rendered between sections in long forms) */
.lf-html-block {
  margin: 0 0 24px;
  padding: 20px 24px;
  background: var(--lf-paper-soft);
  border-left: 3px solid var(--lf-ochre);
  font-family: var(--display, Georgia, serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--lf-ink);
}
.lf-html-block :first-child { margin-top: 0; }
.lf-html-block :last-child { margin-bottom: 0; }
.lf-html-block strong { color: var(--lf-ink); font-weight: 600; }
.lf-html-block .lf-html-heading {
  font-family: var(--display, Georgia, serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--lf-ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

/* Section position counter (Section N of M) */
.lf-section-pos {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-ink-soft);
}

/* Radio group (vertical for long-form questions) */
.lf-field-radio { margin-bottom: 32px; }
.lf-radio-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--lf-rule);
  background: #fff;
  padding: 6px;
}
.lf-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--display, Georgia, serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--lf-ink);
  border-radius: 0;
  transition: background 0.12s ease;
}
.lf-radio:hover { background: var(--lf-paper-soft); }
.lf-radio input[type="radio"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--lf-ochre);
  cursor: pointer;
}
.lf-radio input[type="radio"]:checked + span { color: var(--lf-ochre-deep); font-weight: 500; }
.lf-radio:has(input[type="radio"]:checked) {
  background: rgba(184, 116, 31, 0.06);
}

/* Field hint (placeholder beneath inputs) */
.lf-field-hint {
  margin: 6px 0 0;
  font-family: var(--ui);
  font-size: 12px;
  color: var(--lf-ink-soft);
  font-style: italic;
}

/* File input */
.lf-form input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--ui);
  font-size: 14px;
  background: #fff;
  border: 1px dashed var(--lf-rule);
  cursor: pointer;
}

/* ── Multi-step form: progress + step nav ──────────────────────────── */

.lf-progress {
  margin: 0 0 32px;
  padding: 16px 20px;
  background: var(--lf-paper-soft);
  border: 1px solid var(--lf-rule);
  display: flex;
  align-items: center;
  gap: 16px;
}
.lf-progress-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--lf-rule);
  border-radius: 0;
  overflow: hidden;
}
.lf-progress-bar {
  height: 100%;
  background: var(--lf-ochre);
  width: 0%;
  transition: width 0.3s ease;
}
.lf-progress-label {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lf-ink-soft);
  white-space: nowrap;
}

.lf-form-multistep .lf-section {
  border-top: none;
  padding: 16px 0 32px;
}
.lf-form-multistep .lf-section[hidden] {
  display: none;
}

.lf-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--lf-rule);
}
.lf-step-nav:has(.lf-step-back:only-child) { justify-content: flex-start; }
.lf-step-nav:has(.lf-step-next:only-child) { justify-content: flex-end; }

.lf-step-back,
.lf-step-next {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 12px 24px;
  cursor: pointer;
  border: 1px solid var(--lf-ink);
  background: transparent;
  color: var(--lf-ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.lf-step-back {
  background: transparent;
  color: var(--lf-ink-soft);
  border-color: var(--lf-rule);
}
.lf-step-back:hover { color: var(--lf-ink); border-color: var(--lf-ink); }
.lf-step-next {
  background: var(--lf-ink);
  color: var(--lf-paper);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.lf-step-next:hover {
  background: var(--lf-ochre-deep);
  border-color: var(--lf-ochre-deep);
}

@media (max-width: 600px) {
  .lf-step-nav { flex-direction: column-reverse; gap: 12px; }
  .lf-step-back, .lf-step-next { width: 100%; text-align: center; }
}

/* ── Intro paragraph above the form ───────────────────────────────── */

.fp-intro {
  margin: 0 0 56px;
  font-family: var(--display, Georgia, serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--lf-ink);
}
.fp-intro p { margin: 0 0 16px; }
.fp-intro p:last-child { margin-bottom: 0; }
.fp-intro a {
  color: var(--lf-ochre-deep);
  border-bottom: 1px solid var(--lf-ochre);
  text-decoration: none;
}
.fp-intro a:hover { background: rgba(184, 116, 31, 0.08); }

/* ── Form shell ─────────────────────────────────────────────────────── */

.lf-form {
  font-family: var(--ui);
  color: var(--lf-ink);
}

.lf-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ── Section ────────────────────────────────────────────────────────── */

.lf-section {
  border: none;
  padding: 48px 0;
  margin: 0;
  border-top: 1px solid var(--lf-rule);
}
.lf-section:first-of-type { border-top: none; padding-top: 16px; }

.lf-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.lf-section-num {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--lf-ochre);
  flex-shrink: 0;
}
.lf-legend {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--lf-ink);
  margin: 0;
  padding: 0;
}

.lf-section-note {
  font-family: var(--display);
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--lf-ink-soft);
  margin: -8px 0 32px;
  max-width: 600px;
}

/* ── Field ──────────────────────────────────────────────────────────── */

.lf-row {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}
.lf-row:last-child { margin-bottom: 0; }
.lf-row .lf-field { margin-bottom: 0; }
.lf-row-2 { grid-template-columns: 1fr 1fr; }
.lf-row-state { grid-template-columns: 2fr 1fr; }
.lf-row-sig { grid-template-columns: 2fr 1fr; }

@media (max-width: 600px) {
  .lf-row-2,
  .lf-row-state,
  .lf-row-sig { grid-template-columns: 1fr; }
}

.lf-field {
  margin-bottom: 24px;
}
.lf-field:last-child { margin-bottom: 0; }

.lf-label {
  display: block;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--lf-ink);
  margin-bottom: 8px;
  line-height: 1.4;
}
.lf-label-block {
  margin-bottom: 14px;
}
.lf-req {
  color: var(--lf-ochre);
  font-weight: 600;
  margin-left: 2px;
}
.lf-opt {
  color: var(--lf-ink-soft);
  font-weight: 400;
  font-style: italic;
  font-size: 12px;
  margin-left: 4px;
}

.lf-form input[type="text"],
.lf-form input[type="email"],
.lf-form input[type="tel"],
.lf-form input[type="date"],
.lf-form input[type="number"],
.lf-form select,
.lf-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.4;
  color: var(--lf-ink);
  background: #fff;
  border: 1px solid var(--lf-rule);
  border-radius: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.lf-form input::placeholder,
.lf-form textarea::placeholder {
  color: var(--lf-ink-soft);
  opacity: 0.6;
  font-style: italic;
}

.lf-form input:focus,
.lf-form select:focus,
.lf-form textarea:focus {
  outline: none;
  border-color: var(--lf-ochre);
  box-shadow: 0 0 0 3px rgba(184, 116, 31, 0.12);
}

.lf-form textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  padding: 14px 16px;
}

.lf-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b554a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.lf-form input[type="date"] {
  font-family: var(--ui);
}

/* ── Conditional fields ────────────────────────────────────────────── */

.lf-conditional {
  border-left: 2px solid var(--lf-ochre);
  padding-left: 20px;
  margin-left: 0;
  margin-top: -8px;
  margin-bottom: 24px;
  background: linear-gradient(to right, rgba(184, 116, 31, 0.04), transparent 60%);
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
}
.lf-conditional[hidden] { display: none; }
.lf-conditional .lf-field { margin-bottom: 0; }
.lf-conditional .lf-label {
  font-style: italic;
  color: var(--lf-ink-soft);
  font-weight: 400;
}

/* ── Checkbox grid ─────────────────────────────────────────────────── */

.lf-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin-top: 6px;
  padding: 18px 20px;
  background: var(--lf-paper-soft);
  border-left: 2px solid var(--lf-rule);
}
@media (max-width: 600px) { .lf-checkbox-grid { grid-template-columns: 1fr; } }

.lf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.45;
  color: var(--lf-ink);
}
.lf-check input[type="checkbox"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--lf-ochre);
  cursor: pointer;
}
.lf-check span { padding-top: 1px; }

.lf-check-large {
  font-size: 16px;
  padding: 14px 16px;
  background: rgba(184, 116, 31, 0.05);
  border-left: 2px solid var(--lf-ochre);
}

/* ── Consent block ─────────────────────────────────────────────────── */

.lf-consent {
  background: var(--lf-paper-soft);
  border-left: 3px solid var(--lf-ochre);
  padding: 24px 28px;
  margin: 0 0 28px;
}
.lf-consent-heading {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--lf-ink);
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}
.lf-consent ul {
  margin: 0;
  padding-left: 22px;
  font-family: var(--display);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--lf-ink);
}
.lf-consent li {
  margin-bottom: 12px;
  padding-left: 4px;
}
.lf-consent li::marker { color: var(--lf-ochre); }
.lf-consent li:last-child { margin-bottom: 0; }
.lf-consent strong { color: var(--lf-ink); font-weight: 600; }

/* ── Final note ────────────────────────────────────────────────────── */

.lf-final-note {
  margin: 48px 0 32px;
  padding: 24px 28px;
  border: 1px solid var(--lf-rule);
  background: var(--lf-paper);
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--lf-ink-soft);
  text-align: center;
}
.lf-final-note p { margin: 0; }

/* ── Actions ───────────────────────────────────────────────────────── */

.lf-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.lf-submit {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 18px 48px;
  background: var(--lf-ink);
  color: var(--lf-paper);
  border: 1px solid var(--lf-ink);
  cursor: pointer;
  min-width: 280px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.06s ease;
}
.lf-submit:hover:not(:disabled) {
  background: var(--lf-ochre-deep);
  border-color: var(--lf-ochre-deep);
}
.lf-submit:active:not(:disabled) { transform: translateY(1px); }
.lf-submit:disabled {
  background: var(--lf-ink-soft);
  border-color: var(--lf-ink-soft);
  cursor: not-allowed;
  opacity: 0.7;
}

.lf-status {
  font-family: var(--ui);
  font-size: 13px;
  color: var(--lf-ink-soft);
  margin: 0;
  min-height: 1.4em;
  text-align: center;
  max-width: 480px;
}
.lf-status-error {
  color: var(--lf-error);
  font-weight: 500;
}

/* ── Success state ─────────────────────────────────────────────────── */

.lf-success {
  margin: 64px 0 32px;
  padding: 64px 48px;
  background: var(--lf-paper-soft);
  border: 1px solid var(--lf-rule);
  text-align: center;
}
.lf-success-mark {
  display: block;
  font-size: 40px;
  color: var(--lf-ochre);
  line-height: 1;
  margin-bottom: 24px;
}
.lf-success h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.015em;
  color: var(--lf-ink);
  margin: 0 0 20px;
}
.lf-success p {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--lf-ink);
  margin: 0 auto 16px;
  max-width: 520px;
}
.lf-success p:last-child { margin-bottom: 0; }
.lf-success a {
  color: var(--lf-ochre-deep);
  border-bottom: 1px solid var(--lf-ochre);
  text-decoration: none;
}
.lf-success-foot {
  margin-top: 32px;
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lf-success-foot a { border-bottom: none; }
.lf-success-foot a:hover { border-bottom: 1px solid var(--lf-ochre); }

/* ── Mobile refinements ────────────────────────────────────────────── */

@media (max-width: 600px) {
  .form-page { padding: 32px 20px 64px; }
  .fp-hero { margin-bottom: 40px; padding-bottom: 28px; }
  .fp-deck { font-size: 17px; }
  .fp-meta { gap: 4px 0; flex-direction: column; }
  .fp-meta li::after { display: none; }
  .lf-section { padding: 36px 0; }
  .lf-section-head { gap: 12px; }
  .lf-legend { font-size: 24px; }
  .lf-consent { padding: 20px; }
  .lf-checkbox-grid { padding: 14px 16px; }
  .lf-success { padding: 40px 24px; }
  .lf-success h2 { font-size: 28px; }
  .lf-submit { width: 100%; min-width: 0; }
}
