/* =====================================================================
   WeMonetise — Website intake form (/start)
   Dark-theme component styles, scoped under .intake-page so they never
   collide with the main site components (.card, .brand, etc.).
   Tokens (--bg, --fg, --line…) come from style.css.
   ===================================================================== */

/* ---------- Top progress bar (fixed, above the nav) ---------- */
.intake-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  z-index: 900; background: var(--line); pointer-events: none;
}
.intake-progress > i {
  display: block; height: 100%; width: 0;
  background: var(--fg); transition: width .35s var(--ease);
}

/* ---------- Page shell ---------- */
.intake-page {
  padding-top: clamp(120px, 16vh, 180px);
  /* Site --fg-faint (#66655f) is < 4.5:1 on the dark surfaces; this lifts the
     form's faint text (placeholders, hints, "(optional)") to ~5:1 for WCAG AA. */
  --intake-faint: #8a8980;
}

.intake-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.intake-hero__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.02;
  letter-spacing: -0.035em; margin-top: 4px;
}
.intake-hero__title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  letter-spacing: -0.01em;
}
.intake-hero__sub {
  color: var(--fg-dim); max-width: 600px; margin-top: 26px; font-size: 1.05rem;
}
.intake-hero__meta {
  margin-top: 22px; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--intake-faint);
}
.intake-hero__meta b { color: var(--fg-dim); font-weight: 500; }

/* ---------- Form layout ---------- */
.intake-form-wrap { padding-bottom: clamp(80px, 12vw, 160px); }
.intake-form { max-width: 860px; }

.intake-card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(24px, 3.5vw, 40px);
  margin-bottom: 20px;
}

.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.sec-num {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--intake-faint);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.sec-head h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.sec-sub { color: var(--fg-dim); font-size: 0.95rem; margin: 6px 0 26px; }

/* ---------- Fields ---------- */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
label.q {
  display: block; font-weight: 500; font-size: 0.92rem; color: var(--fg);
  margin-bottom: 10px; letter-spacing: 0.005em;
}
label.q .opt { color: var(--intake-faint); font-weight: 400; font-size: 0.82rem; }
label.q .req { color: var(--fg-dim); }

.intake-page input[type=text],
.intake-page input[type=url],
.intake-page input[type=email],
.intake-page textarea,
.intake-page select {
  width: 100%; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 13px 14px; font-size: 1rem; font-family: var(--font-body);
  font-weight: 300; line-height: 1.5; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.intake-page input::placeholder,
.intake-page textarea::placeholder { color: var(--intake-faint); }
.intake-page input:focus,
.intake-page textarea:focus,
.intake-page select:focus {
  border-color: var(--line-strong); background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.intake-page textarea { min-height: 92px; resize: vertical; }
.intake-page select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9b98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  background-size: 16px; padding-right: 40px;
}
.intake-page select option { background: var(--bg-2); color: var(--fg); }

.hint { color: var(--intake-faint); font-size: 0.8rem; margin-top: 7px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; cursor: pointer; user-select: none;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 9px 16px; font-size: 0.9rem;
  color: var(--fg-dim);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--fg); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.chip.checked { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip:has(input:focus-visible),
.chip:focus-within { outline: 2px solid var(--line-strong); outline-offset: 2px; }

/* ---------- Actions ---------- */
.intake-actions {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: 30px;
}
.intake-actions .btn { cursor: pointer; }
.intake-actions .btn:disabled { opacity: .5; cursor: default; pointer-events: none; }
.save-note {
  font-size: 0.78rem; color: var(--intake-faint); margin-top: 18px;
  font-family: var(--font-mono); letter-spacing: 0.03em;
}

/* ---------- Toast ---------- */
.intake-toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 950;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg); color: var(--bg); font-weight: 500;
  padding: 12px 22px; border-radius: var(--r-pill); font-size: 0.88rem;
  opacity: 0; pointer-events: none; transition: .28s var(--ease);
}
.intake-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Utility — robustly hide. The form is hidden via this class rather than
   form.style.display, because a control named "style" (the Look & feel
   checkboxes) shadows form.style, so form.style.display is a no-op. */
.intake-hidden { display: none !important; }

/* ---------- Thank-you ---------- */
.intake-thankyou { text-align: center; padding: clamp(48px, 8vw, 80px) 24px; }
.ty-check {
  width: 66px; height: 66px; border: 1px solid var(--line-strong);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 28px; line-height: 1; color: var(--fg);
}
.intake-thankyou h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 14px;
}
.intake-thankyou p { color: var(--fg-dim); max-width: 460px; margin: 0 auto; }

/* ---------- Restore native caret on inputs (overrides cursor-on: none) ---------- */
.cursor-on .intake-page input,
.cursor-on .intake-page textarea { cursor: text; }
.cursor-on .intake-page select,
.cursor-on .intake-page .chip { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .chip { padding: 12px 18px; }
  .chips { gap: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .intake-card { padding: 22px; }
  .intake-actions .btn { flex: 1 1 auto; justify-content: center; }
}

.ty-fast { margin-top: 22px; margin-bottom: 16px; color: var(--fg-dim); font-size: 0.98rem; }
.intake-thankyou .btn { margin-top: 4px; }
