/* ---------- Consultation page ----------
   A dedicated full page (consultation.html), not a modal: reuses the site's
   own tokens (colors, fonts, spacing) from styles.css rather than introducing
   a second visual language. See js/consultation-form.js for the step logic,
   the WhatsApp submission, and the CBOS integration note.

   Button and field-label typography note (2026-07-10): CTA buttons and form
   field labels moved from JetBrains Mono to Archivo, the site's prose voice.
   These are the two highest-stakes, most-read touchpoints in the funnel, and
   Mono there was the exact "system readout on content" texture PRODUCT.md's
   anti-references warn against. Everything else that reads as structural
   metadata (step counter, kickers, chips, tags) keeps Mono. */

body.cf-page{
  background:var(--paper); color:var(--ink); font-family:var(--font-sans);
  min-height:100vh; display:flex; flex-direction:column;
}

/* ---------- Header: back link + step count + progress ---------- */
/* Sized to match .site-header-strip on the rest of the site (82px desktop /
   60px mobile), so the wordmark sits at the same height and scale whether
   the visitor lands here or on index.html/projects.html. */
.cf-page-header{
  position:sticky; top:0; z-index:10; background:var(--paper);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:var(--space-5);
  padding:0 clamp(20px,6vw,10vw); min-height:82px;
}
.cf-page-back{
  font-family:var(--font-black); font-size:1.7rem; letter-spacing:-0.01em;
  text-decoration:none; color:var(--ink); white-space:nowrap; flex-shrink:0;
}
.cf-page-back .dot{ color:var(--safety); }
.cf-page-back:focus-visible{ outline:2px solid var(--safety); outline-offset:3px; }
.cf-step-label{
  font-family:var(--font-mono); font-size:0.72rem; color:var(--olive);
  white-space:nowrap;
}
.cf-progress{
  flex:1; height:3px; background:var(--line); border-radius:999px; overflow:hidden;
}
.cf-progress-bar{
  height:100%; width:100%; background:var(--safety);
  transform:scaleX(0.1111); transform-origin:left;
  transition:transform 320ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce){ .cf-progress-bar{ transition:none; } }
@media (max-width:900px){
  .cf-page-header{ min-height:60px; }
  .cf-page-back{ font-size:1.3rem; }
}

/* ---------- Form body ---------- */
.cf-page-main{
  flex:1; display:flex; justify-content:center;
  padding:var(--space-8) clamp(20px,6vw,10vw) var(--space-9);
}
#cf-form{ width:100%; max-width:640px; }
.cf-step{ display:flex; flex-direction:column; gap:var(--space-5); }
.cf-step[hidden]{ display:none; }
.cf-kicker{
  font-family:var(--font-mono); font-size:0.72rem; color:var(--safety-ink);
  text-transform:uppercase; letter-spacing:0.08em;
}
/* h1 = step 0 (the page's single h1); h2 = every later step. Same visual role. */
.cf-step h1, .cf-step h2{
  font-family:var(--font-black); text-transform:uppercase;
  font-size:clamp(1.4rem, 4vw, 1.9rem); line-height:1.1; letter-spacing:-0.01em;
  text-wrap:balance;
}
.cf-lede{ font-size:0.95rem; color:var(--olive); line-height:1.55; text-wrap:pretty; }

/* ---------- Text fields ---------- */
.cf-field{ display:flex; flex-direction:column; gap:6px; }
.cf-field-row{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.cf-field label{
  font-family:var(--font-sans); font-weight:600; font-size:0.78rem; text-transform:uppercase;
  letter-spacing:0.04em; color:var(--olive);
}
.cf-field input, .cf-field select{
  font-family:var(--font-sans); font-size:0.98rem; color:var(--ink);
  border:1px solid var(--line); border-radius:8px; padding:12px 14px;
  background:var(--paper); transition:border-color 200ms var(--ease-out);
}
.cf-field input:focus, .cf-field select:focus{
  outline:none; border-color:var(--safety);
}
.cf-field select{ appearance:none; cursor:pointer; }
.cf-error{
  font-family:var(--font-mono); font-size:0.72rem; color:var(--safety-ink);
  min-height:1em;
}

/* ---------- Choice chips ---------- */
.cf-choice-row{ display:flex; gap:var(--space-3); flex-wrap:wrap; }
.cf-choice-wrap{ row-gap:var(--space-3); }
.cf-choice-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:var(--space-3);
}
.cf-choice-col{ display:flex; flex-direction:column; gap:var(--space-3); }
.cf-chip{
  font-family:var(--font-mono); font-size:0.82rem; color:var(--ink);
  background:var(--paper); border:1px solid var(--ink); border-radius:8px;
  padding:12px 16px; cursor:pointer; text-align:center;
  transition:background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.cf-chip-wide{ text-align:left; }
.cf-chip:hover{ background:var(--paper-2); }
.cf-chip.is-selected{ background:var(--ink); color:var(--paper); }
.cf-chip:focus-visible{ outline:2px solid var(--safety); outline-offset:2px; }
.cf-chip:active{ transform:scale(0.97); }

/* ---------- Design style picker (real reference photography; see JS for the
   verified Unsplash sources and the note on why this step is the one exception
   to the site's no-stock-photography rule) ---------- */
.cf-style-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:var(--space-3);
}
.cf-style-card{
  cursor:pointer; border:1px solid var(--line); border-radius:10px; overflow:hidden;
  background:var(--paper); text-align:left;
  transition:border-color 160ms var(--ease-out);
}
.cf-style-card:hover{ border-color:var(--ink); }
.cf-style-card.is-selected{ border-color:var(--safety); border-width:2px; }
.cf-style-card:focus-visible{ outline:2px solid var(--safety); outline-offset:2px; }
.cf-style-card img{
  width:100%; aspect-ratio:4/3; object-fit:cover; display:block;
}
.cf-style-card span{
  display:block; padding:8px 10px; font-family:var(--font-mono); font-size:0.7rem;
  text-transform:uppercase; letter-spacing:0.04em;
}

/* ---------- Actions ---------- */
.cf-actions{
  display:flex; justify-content:space-between; align-items:center; gap:var(--space-4);
  padding-top:var(--space-2);
}
.cf-actions-back-only{ justify-content:flex-start; }
/* display:flex above outranks [hidden]'s display:none, same trap as .cf-step. */
.cf-actions[hidden]{ display:none; }
.cf-btn-primary{
  background:var(--safety); color:var(--ink); font-weight:700; font-family:var(--font-sans);
  padding:14px 24px; border:none; border-radius:8px; cursor:pointer;
  font-size:0.95rem; text-decoration:none;
  transition:background 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.cf-btn-primary:hover{ background:var(--safety-deep); }
/* WhatsApp actions only (Send via WhatsApp, Open WhatsApp) get WhatsApp green.
   Dark ink text kept for contrast (white on #25D366 fails WCAG). Disabled submit
   still greys out via .cf-btn-primary:disabled. */
#cf-submit:not(:disabled),
#cf-whatsapp-fallback{ background:#25D366; }
#cf-submit:not(:disabled):hover,
#cf-whatsapp-fallback:hover{ background:#1EBE57; }
.cf-btn-primary:active{ transform:scale(0.97); }
.cf-btn-primary:disabled{ background:var(--line); color:var(--olive); cursor:not-allowed; }
.cf-btn-primary:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.cf-btn-ghost{
  background:none; border:1px solid var(--line); color:var(--olive);
  font-family:var(--font-sans); font-weight:600; font-size:0.92rem; padding:14px 20px; border-radius:8px;
  cursor:pointer; text-decoration:none; display:inline-block; text-align:center;
  transition:border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.cf-btn-ghost:hover{ border-color:var(--ink); color:var(--ink); }
.cf-btn-ghost:focus-visible{ outline:2px solid var(--safety); outline-offset:2px; }

/* ---------- Resume prompt (unfinished draft found in this tab) ---------- */
.cf-resume{
  background:var(--paper-2); border:1px solid var(--line); border-left:3px solid var(--safety);
  border-radius:10px; padding:var(--space-5); margin-top:var(--space-5);
  display:flex; flex-direction:column; gap:var(--space-4);
}
/* Same reason as .cf-step[hidden] above: a class selector's display:flex outranks
   the [hidden] attribute's display:none, so the bar needs to opt out explicitly. */
.cf-resume[hidden]{ display:none; }
.cf-resume p{ font-size:0.95rem; color:var(--olive); }
.cf-resume strong{ font-family:var(--font-mono); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--safety-ink); }
.cf-resume-actions{ display:flex; gap:var(--space-4); flex-wrap:wrap; }

/* ---------- Confirmation screen ---------- */
.cf-confirm{ align-items:flex-start; }
.cf-confirm .cf-btn-primary{ align-self:flex-start; }
.cf-confirm-actions{ display:flex; gap:var(--space-4); flex-wrap:wrap; }

/* PDPA notice under the send button. Deliberately quieter than .cf-lede: it is
   a disclosure the visitor is entitled to see, not a sales line competing with
   the button above it. */
.cf-privacy{
  margin-top:var(--space-5); font-size:0.8rem; color:var(--olive); line-height:1.5; max-width:52ch;
}
.cf-privacy a{ color:var(--safety-ink); text-decoration-thickness:1px; text-underline-offset:3px; }
.cf-privacy a:hover{ color:var(--safety-deep); }
.cf-privacy a:focus-visible{ outline:2px solid var(--safety); outline-offset:3px; }

@media (max-width:560px){
  .cf-field-row{ grid-template-columns:1fr; }
  .cf-style-grid{ grid-template-columns:repeat(2, 1fr); }
  .cf-choice-grid{ grid-template-columns:repeat(2, 1fr); }
}