/* public/css/intake.css — G6C intake form.
 *
 * Structural only. Track A restyles later with the brand visual system;
 * these tokens are the agreed handoff surface so the restyle is friction-free.
 * No hover choreography, no animations beyond the save-status fade.
 */

:root {
  --bg: #0A0908;
  --surface: #141316;
  --gold: #BE9E50;
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --error: #E5806B;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --space: 16px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

.intake-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--space) * 2) var(--space) calc(var(--space) * 8);
}

/* ── header ─────────────────────────────────────────────────────────────── */

.intake-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: calc(var(--space) * 1.5);
  margin-bottom: var(--space);
}

.intake-title {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 calc(var(--space) * 0.5);
  color: var(--text);
}

.intake-greeting {
  margin: 0 0 var(--space);
  color: var(--text-secondary);
}

.intake-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 var(--space);
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}
progress::-webkit-progress-bar { background: var(--surface); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 999px; }

.lang-toggle { display: inline-flex; gap: 4px; }
.lang-toggle button {
  font: inherit;
  font-size: 0.8rem;
  padding: 4px 12px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle button.is-active {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

/* ── form fields ────────────────────────────────────────────────────────── */

.intake-form { display: flex; flex-direction: column; }

.intake-section {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space) 0 0;
  padding: calc(var(--space) * 1.25) 0 0;
}
.intake-section:first-of-type { border-top: 0; }

.intake-section-legend {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0;
  margin-bottom: var(--space);
}

.intake-field { margin: 0 0 calc(var(--space) * 1.5); }

.intake-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.intake-field-label .req { color: var(--gold); margin-left: 4px; }

.intake-field-help {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 4px 0 8px;
}

.intake-field input[type="text"],
.intake-field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.intake-field textarea { resize: vertical; min-height: 88px; }

.intake-field input[type="text"]:focus,
.intake-field textarea:focus,
.lang-toggle button:focus-visible,
.intake-submit:focus-visible,
.intake-choice input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.intake-choices { display: flex; flex-direction: column; gap: 8px; }
.intake-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}
.intake-choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); }
.intake-choice span { color: var(--text); }

.defer-note {
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 0;
  font-size: 0.9rem;
}

/* ── footer / submit ────────────────────────────────────────────────────── */

.intake-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--space) 0;
  margin-top: var(--space);
}

.save-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 200ms ease;
}
.save-status.is-visible { opacity: 1; }
.save-status.is-error { color: var(--error); }

.intake-submit {
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
}
.intake-submit[disabled] {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ── error / confirm states ─────────────────────────────────────────────── */

.intake-error,
.intake-confirm {
  text-align: center;
  padding: calc(var(--space) * 3) var(--space);
}
.intake-error h2 { color: var(--error); }
.intake-confirm h2 { color: var(--gold); }
.intake-error p,
.intake-confirm p { color: var(--text-secondary); }

/* When the link is invalid or the form is submitted, the form + footer hide
 * (toggled via [hidden] from JS). */
[hidden] { display: none !important; }

@media (max-width: 480px) {
  .intake-title { font-size: 1.25rem; }
  .intake-footer { flex-direction: column; align-items: stretch; }
  .intake-submit { width: 100%; }
}
