/* Big Mike's Inquiry Almanac — front-end inquiry form */

.bmia-f {
  --f-choc: #3b2417;
  --f-soft: #76604f;
  --f-faint: #b3a08c;
  --f-bronze: #8c5a34;
  --f-gold: #c39a44;
  --f-kale: #3e5a40;
  --f-cream: #f6eee0;
  --f-paper: #fffbf4;
  --f-rule: #e6d7c1;
  --f-red: #a4473d;
  --f-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-sans: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--f-sans);
  color: var(--f-choc);
  background: var(--f-paper);
  border: 1px solid var(--f-rule);
  padding: 30px 32px 28px;
  max-width: 1040px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.5;
  position: relative;
}

/* Gold corner brackets, top left and bottom right. */
.bmia-f::before,
.bmia-f::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.bmia-f::before {
  top: 12px;
  left: 12px;
  border-top: 1.5px solid var(--f-gold);
  border-left: 1.5px solid var(--f-gold);
}
.bmia-f::after {
  right: 12px;
  bottom: 12px;
  border-right: 1.5px solid var(--f-gold);
  border-bottom: 1.5px solid var(--f-gold);
}

.bmia-f *,
.bmia-f *::before,
.bmia-f *::after { box-sizing: border-box; }

/* On a dark page or under a hero band: lift the card off the backdrop. */
.bmia-f.is-dark {
  border-color: rgba(230, 215, 193, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.bmia-f-cols { display: flex; gap: 30px; align-items: flex-start; }
.bmia-f-main { flex: 1 1 auto; min-width: 0; }

/* ---------- header ---------- */

.bmia-f-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--f-bronze);
  margin: 0 0 7px;
}
.bmia-f-title {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 9px;
  color: var(--f-kale);
}
/* No cap: the intro is a single line, bounded by the column it sits in. */
.bmia-f-intro { font-size: 14.5px; color: var(--f-soft); margin: 0 0 16px; }
.bmia-f-rule { height: 1px; background: rgba(230, 215, 193, 0.7); margin-bottom: 26px; overflow: hidden; }
.bmia-f-rule i {
  display: block;
  height: 1px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--f-gold), rgba(195, 154, 68, 0.3) 62%, transparent);
}
.bmia-f.is-ready .bmia-f-rule i { animation: bmia-f-draw 900ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes bmia-f-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- sections ---------- */

.bmia-f-section { margin-bottom: 30px; }
.bmia-f-sechead {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 14px;
  color: var(--f-bronze);
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.bmia-f-sechead span { font-variant-numeric: tabular-nums; color: var(--f-gold); }
.bmia-f-sechead::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--f-rule);
}

.bmia-f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.bmia-f-field { grid-column: 1 / -1; min-width: 0; }
/* Two-up fields share a row height. Making them columns and pushing the
   control to the bottom keeps the boxes level when one hint wraps to a
   second line and its neighbour's does not. */
.bmia-f-field.is-half { grid-column: span 1; display: flex; flex-direction: column; }
.bmia-f-field.is-half > input,
.bmia-f-field.is-half > select,
.bmia-f-field.is-half > textarea { margin-top: auto; }

/* ---------- labels and inputs ---------- */

/* Label and hint share a line-height and a bottom margin, so the gap above a
   control is the same whether or not the field carries a hint. */
.bmia-f-field label,
.bmia-f-field legend {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--f-choc);
  margin: 0 0 5px;
  padding: 0;
}
.bmia-f-field fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bmia-f-req { color: var(--f-gold); margin-left: 3px; }
.bmia-f-hint {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--f-soft);
  margin: -1px 0 5px;
  font-style: italic;
}
/* A standing fact about the question, not an instruction: set off enough
   to be read, quiet enough not to compete with the choices below it. */
.bmia-f-note {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--f-choc);
  background: rgba(195, 154, 68, 0.1);
  border-left: 2px solid var(--f-gold);
  border-radius: 0;
  padding: 7px 10px;
  margin: 0 0 9px;
}

.bmia-f input[type="text"],
.bmia-f input[type="email"],
.bmia-f input[type="tel"],
.bmia-f select,
.bmia-f textarea {
  width: 100%;
  max-width: 100%;
  font: 15px/1.4 var(--f-sans);
  color: var(--f-choc);
  background: #fff;
  border: 1px solid var(--f-rule);
  border-radius: 0;
  padding: 10px 12px;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 140ms ease;
}
.bmia-f select {
  background-image: linear-gradient(45deg, transparent 50%, var(--f-bronze) 50%), linear-gradient(135deg, var(--f-bronze) 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.bmia-f textarea { min-height: 76px; resize: vertical; }
.bmia-f input:hover,
.bmia-f select:hover,
.bmia-f textarea:hover { border-color: var(--f-faint); }
.bmia-f input:focus,
.bmia-f select:focus,
.bmia-f textarea:focus {
  outline: 2px solid rgba(195, 154, 68, 0.45);
  outline-offset: 1px;
  border-color: var(--f-gold);
}
.bmia-f-sub { margin-top: 8px; }

/* ---------- choices ---------- */

.bmia-f-choices { display: flex; flex-wrap: wrap; gap: 7px; }
/* One choice per row, with a paired free-text box beside its trigger. */
.bmia-f-choices.is-stacked { flex-direction: column; align-items: flex-start; }
.bmia-f-inline { display: flex; align-items: stretch; gap: 7px; width: 100%; min-width: 0; }
/* The label stretches to the row, but its inner span sets the coloured fill,
   so the span has to fill the label or the button reads shorter than the box. */
.bmia-f-inline .bmia-f-choice { flex: 0 0 auto; display: flex; }
.bmia-f-inline .bmia-f-choice span { display: flex; align-items: center; width: 100%; }
.bmia-f-inline .bmia-f-other { flex: 1 1 auto; margin-top: 0; min-width: 0; }
.bmia-f-choice { position: relative; margin: 0 !important; }
.bmia-f-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.bmia-f-choice span {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--f-rule);
  background: #fff;
  font-size: 13.5px;
  line-height: 1.3;
  transition: border-color 140ms ease, background 140ms ease;
}
.bmia-f-choice:hover span { border-color: var(--f-faint); }
.bmia-f-choice input:checked + span {
  background: var(--f-choc);
  border-color: var(--f-choc);
  color: var(--f-cream);
}
.bmia-f-choice input:focus-visible + span { outline: 2px solid var(--f-gold); outline-offset: 2px; }

/* ---------- menu cards ---------- */

.bmia-f-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.bmia-f-card { position: relative; margin: 0 !important; }
.bmia-f-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.bmia-f-card-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--f-rule);
  background: #fff;
  font-size: 13px;
  line-height: 1.3;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.bmia-f-card-in::after {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--f-rule);
  border-radius: 50%;
}
.bmia-f-card:hover .bmia-f-card-in { border-color: var(--f-faint); }
.bmia-f-card input:checked + .bmia-f-card-in {
  background: var(--f-choc);
  border-color: var(--f-choc);
  color: var(--f-cream);
}
.bmia-f-card input:checked + .bmia-f-card-in::after {
  border-color: var(--f-gold);
  background: var(--f-gold);
}
.bmia-f-card input:focus-visible + .bmia-f-card-in { outline: 2px solid var(--f-gold); outline-offset: 2px; }
.bmia-f-card.is-other .bmia-f-card-in { color: var(--f-soft); }
.bmia-f-card.is-other input:checked + .bmia-f-card-in { color: var(--f-cream); }

/* ---------- menu-style choices ----------
   Where the choices are the thing being sold, they read as a printed menu:
   a serif name with a line of description, not a grid of checkboxes. */

.bmia-f-menu { border: 1px solid var(--f-rule); background: #fff; }
.bmia-f-menu-item { position: relative; display: block; margin: 0 !important; }
.bmia-f-menu-item input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.bmia-f-menu-in {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 14px;
  border-left: 2px solid transparent;
  border-bottom: 1px dotted #e0d2bd;
  transition: background 140ms ease, border-color 140ms ease;
}
.bmia-f-menu-item:last-child .bmia-f-menu-in { border-bottom: 0; }
.bmia-f-menu-tick {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid #d8cbb8;
  border-radius: 50%;
  transition: background 140ms ease, border-color 140ms ease;
}
.bmia-f-menu-txt { min-width: 0; }
.bmia-f-menu-name {
  display: block;
  font-family: var(--f-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--f-choc);
}
.bmia-f-menu-desc {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--f-soft);
  margin-top: 3px;
}
.bmia-f-menu-item:hover .bmia-f-menu-in { background: #fdfaf4; }
.bmia-f-menu-item input:checked + .bmia-f-menu-in {
  background: #fdf8ef;
  border-left-color: var(--f-gold);
}
.bmia-f-menu-item input:checked + .bmia-f-menu-in .bmia-f-menu-tick {
  background: var(--f-gold);
  border-color: var(--f-gold);
}
.bmia-f-menu-item input:focus-visible + .bmia-f-menu-in {
  outline: 2px solid var(--f-gold);
  outline-offset: -2px;
}
.bmia-f-menu-item.is-other .bmia-f-menu-name {
  font-family: var(--f-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--f-soft);
}

/* ---------- errors ---------- */

.bmia-f-err { font-size: 12.5px; color: var(--f-red); margin: 6px 0 0; }
.bmia-f-field.has-error input,
.bmia-f-field.has-error select,
.bmia-f-field.has-error textarea { border-color: var(--f-red); }
.bmia-f-field.has-error .bmia-f-choice span,
.bmia-f-field.has-error .bmia-f-card-in { border-color: var(--f-red); }
.bmia-f-field.has-error .bmia-f-menu { border-color: var(--f-red); }

/* ---------- ticket ---------- */

.bmia-f-ticket { width: 232px; flex: none; }
.bmia-f-ticket-in {
  position: sticky;
  top: 24px;
  border: 1px solid var(--f-rule);
  background: var(--f-cream);
  padding: 18px 18px 16px;
}
.bmia-f-ticket-head {
  font-family: var(--f-serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--f-bronze);
  margin: 0 0 12px;
}
.bmia-f-ticket-list { margin: 0; font-size: 13px; }
.bmia-f-ticket-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted #d8cbb8;
}
.bmia-f-ticket-list > div:last-of-type { border-bottom: 0; }
.bmia-f-ticket-list dt { color: var(--f-soft); font-size: 12.5px; flex: none; margin: 0; }
.bmia-f-ticket-list dd {
  margin: 0;
  text-align: right;
  color: var(--f-faint);
  min-width: 0;
  overflow-wrap: anywhere;
}
.bmia-f-ticket-list > div.is-set dd { color: var(--f-choc); }

.bmia-f-send {
  display: block;
  width: 100%;
  margin-top: 15px;
  background: var(--f-choc);
  color: var(--f-cream);
  border: 0;
  border-radius: 0;
  padding: 12px 14px;
  font: 500 14px/1.2 var(--f-sans);
  cursor: pointer;
  transition: background 140ms ease;
}
.bmia-f-send:hover:not(:disabled) { background: var(--f-bronze); }
.bmia-f-send:disabled { background: var(--f-faint); cursor: default; }
.bmia-f-send:focus-visible { outline: 2px solid var(--f-gold); outline-offset: 2px; }

.bmia-f-left { font-size: 11.5px; color: var(--f-soft); margin: 8px 0 0; line-height: 1.4; }
.bmia-f-left.is-ready { color: var(--f-bronze); }
.bmia-f-formerr { font-size: 12.5px; color: var(--f-red); margin: 8px 0 0; line-height: 1.4; }

/* ---------- fine print, honeypot, warning ---------- */

.bmia-f-fineprint {
  border-top: 1px solid var(--f-rule);
  padding-top: 14px;
  margin-top: 4px;
}
.bmia-f-fineprint p { font-size: 11.5px; color: var(--f-soft); margin: 0; line-height: 1.6; font-style: italic; }
.bmia-f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bmia-f-warn { border-left: 3px solid #a4473d; padding: 10px 14px; background: #fff; font-size: 14px; }

/* ---------- confirmation ---------- */

.bmia-f-thanks { max-width: 60ch; }
.bmia-f-thanks:focus { outline: none; }
.bmia-f-receipt { margin: 0; font-size: 14px; max-width: 330px; }
.bmia-f-receipt > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dotted #d8cbb8;
}
.bmia-f-receipt dt { color: var(--f-soft); font-size: 13px; margin: 0; flex: none; }
.bmia-f-receipt dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* ---------- theme guard ----------
   Astra and Elementor set margins and line-heights on bare elements through
   selectors like .entry-content p and .entry-content h2, which outrank the
   single-class rules above and reopen the gaps this form sets for itself.
   The rules below restate that spacing at a specificity the theme cannot
   reach past, so the form lays out the same wherever it is placed. */

.bmia-f .bmia-f-head p.bmia-f-eyebrow { margin: 0 0 7px; line-height: 1.4; }
.bmia-f .bmia-f-head p.bmia-f-intro,
.bmia-f .bmia-f-thanks p.bmia-f-intro { margin: 0 0 16px; line-height: 1.5; }
.bmia-f h2.bmia-f-title { margin: 0 0 9px; line-height: 1.12; }
.bmia-f h3.bmia-f-sechead { margin: 0 0 14px; line-height: 1.3; }

/* Only the field's own label and legend — not the labels wrapping each
   choice, which carry their own layout. */
.bmia-f .bmia-f-field > label,
.bmia-f .bmia-f-field > fieldset > legend {
  display: block;
  margin: 0 0 5px;
  padding: 0;
  width: auto;
  border: 0;
  line-height: 1.35;
}
.bmia-f .bmia-f-field p.bmia-f-hint { margin: -1px 0 5px; line-height: 1.35; }
.bmia-f .bmia-f-field p.bmia-f-note { margin: 0 0 9px; line-height: 1.4; }
.bmia-f .bmia-f-field p.bmia-f-err { margin: 6px 0 0; line-height: 1.4; }

.bmia-f input,
.bmia-f select,
.bmia-f textarea { margin: 0; }
.bmia-f .bmia-f-field .bmia-f-sub { margin: 8px 0 0; }
.bmia-f .bmia-f-field .bmia-f-inline .bmia-f-other { margin: 0; }

.bmia-f .bmia-f-fineprint p { margin: 0; line-height: 1.6; }
.bmia-f .bmia-f-ticket-in p.bmia-f-ticket-head { margin: 0 0 12px; line-height: 1.3; }
.bmia-f .bmia-f-ticket-in p.bmia-f-left,
.bmia-f .bmia-f-ticket-in p.bmia-f-formerr { margin: 8px 0 0; line-height: 1.4; }
.bmia-f .bmia-f-ticket-list dt,
.bmia-f .bmia-f-ticket-list dd,
.bmia-f .bmia-f-receipt dt,
.bmia-f .bmia-f-receipt dd { margin: 0; }
.bmia-f .bmia-f-ticket-list,
.bmia-f .bmia-f-receipt { margin: 0; }

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .bmia-f { padding: 22px 18px 20px; }
  .bmia-f-cols { flex-direction: column; gap: 22px; }
  .bmia-f-ticket { width: 100%; order: 2; }
  .bmia-f-ticket-in { position: static; }
  .bmia-f-title { font-size: 25px; }
}

@media (max-width: 560px) {
  .bmia-f { padding: 18px 14px 16px; border-left: 0; border-right: 0; }
  /* The card runs edge to edge here, so the brackets have no corner to mark. */
  .bmia-f::before,
  .bmia-f::after { display: none; }
  .bmia-f-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bmia-f-field.is-half { grid-column: 1 / -1; }
  .bmia-f-cards { grid-template-columns: minmax(0, 1fr); }
  .bmia-f-title { font-size: 22px; }
  /* No room for a choice and its box side by side: stack them. */
  .bmia-f-inline { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .bmia-f *,
  .bmia-f *::before,
  .bmia-f *::after {
    animation: none !important;
    transition: none !important;
  }
}
