/* ============================================================
   ENQUIRY — the stepped "Start a project" dialog
   ------------------------------------------------------------
   A single panel over a blurred page, one question per screen,
   a hairline progress bar across the top edge. Markup lives at
   the end of the contact section in index.html; behaviour is in
   js/enquiry.js.
   ============================================================ */

.enq {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: grid;
  place-items: center;
  padding: 16px;
}
.enq[hidden] { display: none; }

.enq__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, .62);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.enq__panel {
  position: relative;
  width: min(100%, 36rem);
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  padding: clamp(1.9rem, 5vw, 2.8rem) clamp(1.4rem, 5vw, 2.8rem) clamp(1.6rem, 4vw, 2.4rem);
  background: var(--ground-2);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.enq.is-open .enq__backdrop { opacity: 1; }
.enq.is-open .enq__panel    { opacity: 1; transform: none; }

/* ── Progress — fills left to right as steps are answered ──── */
.enq__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rule-soft);
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}
.enq__progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--enq-p, .1667));
  transition: transform var(--dur) var(--ease-out);
}

.enq__close {
  position: absolute;
  top: 1rem; right: 1rem;
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  .enq__close:hover { color: var(--ink); border-color: var(--rule-strong); }
}

/* ── A step ─────────────────────────────────────────────────── */
.enq__step[hidden] { display: none; }
.enq__step { animation: enq-in .45s var(--ease-out) both; }
.enq__step.is-back { animation-name: enq-in-back; }

@keyframes enq-in      { from { opacity: 0; transform: translateX(14px); } }
@keyframes enq-in-back { from { opacity: 0; transform: translateX(-14px); } }

.enq__count {
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 2.5rem .9rem 0;
}
.enq__q {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--track-tight);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.enq__hint {
  margin: .55rem 0 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink-3);
}

.enq__input {
  display: block;
  width: 100%;
  margin-top: 1.6rem;
  padding: .9rem 1.1rem;
  font-size: 1rem;
  color: var(--ink);
  background: var(--ground-3);
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.enq__input::placeholder { color: var(--ink-dim); }
.enq__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(171, 146, 191, .18);
}
.enq__input--area { resize: vertical; min-height: 7.5rem; line-height: 1.6; }
.enq__step.has-error .enq__input { border-color: #ff6b81; }

/* ── Choice chips (the "what to build" step) ───────────────── */
.enq__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.6rem;
}
.enq__chip {
  padding: .6rem 1.05rem;
  font-size: .88rem;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  .enq__chip:hover { color: var(--ink); border-color: var(--accent); }
}
.enq__chip[aria-checked="true"] {
  background: var(--fill-strong);
  border-color: var(--fill-strong);
  color: var(--on-fill-strong);
}
.enq__chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.enq__err {
  min-height: 1.1rem;
  margin: .55rem 0 0;
  font-size: .78rem;
  color: #ff8fa0;
}

/* ── Footer — Back on the left, Continue on the right ──────── */
.enq__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .7rem;
  margin-top: 1.1rem;
}
.enq__foot [data-enquiry-back] { margin-right: auto; }
.enq__foot .btn[hidden] { display: none; }   /* .btn sets display */
.enq__foot .btn { padding: .72rem 1.5rem; }
.enq__foot .btn[disabled] { opacity: .6; pointer-events: none; }

.enq__done { outline: none; animation: enq-in .45s var(--ease-out) both; }
.enq__done[hidden] { display: none; }
.enq__done .enq__foot { margin-top: 1.8rem; }

@media (prefers-reduced-motion: reduce) {
  .enq__step, .enq__done { animation: none; }
  .enq__panel { transform: none; }
}

/* ── Spam trap ──────────────────────────────────────────────
   Not display:none - plenty of bots skip those. Taken out of the
   flow, clipped to nothing, hidden from assistive tech by its
   own aria-hidden, and never focusable, so no person meets it. */
.enq__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consent line under the last question — quieter than the hint above
   the field, since it is a note rather than an instruction. */
.enq__consent {
  margin-top: 1rem;
  font-size: var(--fs-micro);
  color: var(--ink-3);
}
.enq__consent a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
@media (hover: hover) { .enq__consent a:hover { color: var(--ink); } }
