/* Forms. No input styles existed on the site, so these are derived from the
   existing tokens — the card border, inset radius, body font and accent — rather
   than invented. All colour goes through styles.css tokens. */

.formpage {
  background: var(--card);
  padding-block: clamp(48px, 7vw, 88px);
  padding-inline: max(var(--pad), calc((100% - var(--content)) / 2));
}
.formpage__head { max-width: 34ch; }
.formpage__head h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 600; line-height: 1.05; letter-spacing: -.034em;
  color: var(--ink-deep);
}
.formpage__head p {
  margin: 16px 0 0;
  font-size: clamp(15px, 1.2vw, 18px); line-height: 1.5;
  letter-spacing: -.018em; color: var(--muted);
}
.formpage__body { max-width: 560px; margin-top: clamp(32px, 4vw, 48px); }

/* ---------- fields ---------- */
.form__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.form__step[hidden] { display: none; }
.form__legend {
  padding: 0; margin-bottom: 22px;
  font-size: 18px; font-weight: 600; letter-spacing: -.022em; color: var(--ink-deep);
}
.form__hint {
  margin-left: 8px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2);
}

.field { margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.field__label {
  display: block; margin-bottom: 7px;
  font-size: 14px; font-weight: 500; letter-spacing: -.012em; color: var(--ink);
}
.field__opt {
  font-weight: 400; font-size: 12.5px; color: var(--muted-2);
}
.field__input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans); font-size: 15.5px; line-height: 1.4;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-inset);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field__input::placeholder { color: var(--muted-2); }
.field__input:hover { border-color: var(--line-strong, var(--muted-2)); }
.field__input:focus-visible {
  outline: none;
  border-color: var(--accent-700);
  box-shadow: 0 0 0 3px var(--accent-200);
}
.field__input:user-invalid { border-color: var(--accent-700); }
.field__select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--ink);
}
.field__select:invalid { color: var(--muted-2); }
.field__area { resize: vertical; min-height: 104px; }
.field__help  { margin: 7px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.field__count { margin: 6px 0 0; font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-align: right; }

/* ---------- skill picks (named to avoid the landing page's .pick switcher) ---------- */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer;
}
.pick span {
  display: block;
  padding: 9px 14px;
  font-size: 13.5px; letter-spacing: -.012em; color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.pick input:hover + span { border-color: var(--muted-2); color: var(--ink); }
.pick input:focus-visible + span { border-color: var(--accent-700); box-shadow: 0 0 0 3px var(--accent-200); }
.pick input:checked + span {
  color: var(--card); background: var(--accent-700); border-color: var(--accent-700);
}

/* honeypot: off-screen, not display:none, so bots still fill it */
/* ---------- submit, errors, consent ---------- */
.form__submit { margin-top: 4px; }
.form__submit[disabled] { opacity: .6; cursor: progress; }
.form__error {
  margin: 0 0 14px;
  padding: 11px 14px;
  font-size: 14px; line-height: 1.45; color: var(--accent-900);
  background: var(--accent-100); border: 1px solid var(--line); border-radius: var(--r-inset);
}
.form__error[hidden] { display: none; }
.form__consent { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-2); }
.form__consent a { color: var(--accent-700); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- confirmation ---------- */
.done[hidden] { display: none; }
.done__head {
  margin: 0 0 12px;
  font-size: clamp(23px, 2.5vw, 33px);
  font-weight: 600; line-height: 1.14; letter-spacing: -.03em; color: var(--ink-deep);
}
.done__body { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.done__lead { color: var(--muted); }
.done__act  { margin: 18px 0 0; }
.done__later { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.done__wa {
  margin: 20px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
}
.done__wa a { color: var(--accent-700); text-decoration: underline; text-underline-offset: 2px; }

/* Cal embed in our own card. Height scales with the viewport so the slot list
   stays usable on a phone — deliberately not a fixed 600px. */
.calcard {
  margin-top: 18px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.calcard[hidden] { display: none; }
.calcard__slot { height: clamp(560px, 82vh, 920px); overflow: auto; }
.calcard__loading {
  margin: 0; padding: 28px 12px;
  font-size: 14px; color: var(--muted-2);
}
.calcard.is-live .calcard__loading { display: none; }

/* ---------- Stock Room modal ---------- */
.modal {
  width: min(560px, calc(100vw - 2 * var(--pad)));
  max-height: calc(100vh - 2 * var(--pad));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  color: var(--ink);
  overflow: auto;
}
.modal::backdrop {
  background: rgba(46, 31, 20, .42);                        /* fallback */
  background: color-mix(in srgb, var(--ink-deep) 42%, transparent);
}
.modal__inner { padding: clamp(22px, 3.5vw, 34px); }
.modal__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal__title {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 600; line-height: 1.16; letter-spacing: -.028em; color: var(--ink-deep);
}
.modal__sub { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.modal__x {
  flex: none;
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
}
.modal__x:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 640px) {
  .form__submit, .done__act .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .field__input, .pick span { transition: none; }
}

/* ---------- international phone ---------- */
.phone { position: relative; display: flex; gap: 8px; }
.phone__pick {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 12px;
  font-family: var(--sans); font-size: 15px;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-inset);
  cursor: pointer;
}
.phone__pick:hover { border-color: var(--muted-2); }
.phone__pick[aria-expanded="true"],
.phone__pick:focus-visible {
  outline: none; border-color: var(--accent-700); box-shadow: 0 0 0 3px var(--accent-200);
}
.phone__flag { font-size: 17px; line-height: 1; }
.phone__dial { font-variant-numeric: tabular-nums; }
.phone__chev { width: 13px; height: 13px; color: var(--muted-2); }
.phone__num { flex: 1 1 auto; min-width: 0; }

.phone__menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: min(340px, 100%);
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-inset);
  box-shadow: 0 18px 40px -22px rgba(46, 31, 20, .45);
  overflow: hidden;
}
.phone__menu[hidden] { display: none; }
.phone__search {
  width: 100%; padding: 11px 14px;
  font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); background: var(--card);
}
.phone__search:focus-visible { outline: none; background: var(--accent-50); }
.phone__list { margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto; }
.phone__list li {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.phone__list li:hover, .phone__list li.is-on { background: var(--accent-50); }
.phone__list li[hidden] { display: none; }
.phone__cname { flex: 1 1 auto; }
.phone__cdial { color: var(--muted-2); font-variant-numeric: tabular-nums; }

.phone__wa { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.phone__wa[hidden] { display: none; }
.phone__wa a { color: var(--accent-700); text-decoration: underline; text-underline-offset: 2px; }
.phone__wa .wa__icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.phone__tick { width: 14px; height: 14px; vertical-align: -3px; margin-right: 5px; color: var(--accent-700); }
.phone__wa.is-ok span { color: var(--accent-900); font-weight: 500; }
.phone__wa.is-bad span { color: var(--muted); font-weight: 400; }
.phone__wa.is-ok { color: var(--muted); }
.phone__wa.is-bad { color: var(--accent-900); }

/* ---------- multi-select ---------- */
.multi { position: relative; }
.multi__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; cursor: pointer;
}
.multi__toggle[aria-expanded="true"] { border-color: var(--accent-700); box-shadow: 0 0 0 3px var(--accent-200); }
.multi__toggle.is-empty span:first-child { color: var(--muted-2); }
.multi__chev { width: 14px; height: 14px; flex: none; color: var(--muted-2); transition: transform 160ms ease; }
.multi__toggle[aria-expanded="true"] .multi__chev { transform: rotate(180deg); }
.multi__menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-inset);
  box-shadow: 0 18px 40px -22px rgba(46, 31, 20, .45);
}
.multi__menu[hidden] { display: none; }
.multi__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 14.5px; color: var(--ink); cursor: pointer;
}
.multi__opt:hover { background: var(--accent-50); }
.multi__opt input { width: 15px; height: 15px; accent-color: var(--accent-700); flex: none; }

/* ---------- confirmation extras ---------- */
.wa { display: inline-flex; align-items: center; gap: 6px; }
.wa__icon { width: 15px; height: 15px; flex: none; }
.done__redirect {
  margin: 14px 0 0;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2);
}
.done__redirect[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .multi__chev { transition: none; } }

/* ---------- plan note ----------
   Shown above the form when the visitor arrives from a pricing card. */
.planote {
  margin: 0 0 24px; padding: 14px 16px;
  max-width: 56ch;
  font-size: 14.5px; line-height: 1.6; color: var(--accent-900);
  background: var(--accent-50);
  border: 1px solid var(--accent-200); border-radius: var(--r-inset);
}
.planote[hidden] { display: none; }
.planote [data-plan-copy][hidden] { display: none; }

/* The plan name reads as a coffee-brown chip leading the sentence. */
.planote__tag {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--card); background: var(--accent-700);
  border-radius: 5px;
  vertical-align: 1px;
  white-space: nowrap;
}
