/* Project starter – the contact section on the homepage and Bromley page (13 Nov 2026).
   Markup comes from tools/starter_section.py; behaviour from assets/js/starter.js.
   Without JavaScript only the enquiry form shows, so nobody is ever stuck. */

.bfs { --bfs-mist: #f3f5fb; --bfs-soft: #4b4f78; --bfs-hair: #dfe2ef; --bfs-line: #c9cde3; --bfs-gap: 24px; }
.bfs [hidden] { display: none !important; }
.bfs-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--bfs-gap) clamp(40px, 6vw, 112px); align-items: start; }
@media (max-width: 900px) { .bfs-cols { grid-template-columns: minmax(0, 1fr); } }

/* Left column: heading, intro, steps – one even gap between each */
.bfs-side h2 { margin: 0; }
.bfs .bfs-intro { margin: var(--bfs-gap) 0 0; max-width: 38ch; }
.bfs-steps { list-style: none; margin: var(--bfs-gap) 0 0; padding: 0; display: grid; gap: 12px; }
.bfs-steps li { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: var(--bfs-soft); line-height: 1.4; }
.bfs-steps li span { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--bfs-line); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; box-sizing: border-box; }
.bfs-steps li[aria-current="step"] { color: var(--navy); font-weight: 600; }
.bfs-steps li[aria-current="step"] span { background: var(--navy); border-color: var(--navy); color: #fff; }

/* The box on the right */
.bfs-panel { background: var(--bfs-mist); border-radius: 24px; padding: clamp(24px, 2.8vw, 36px); min-width: 0; }
.bfs-js .bfs-panel { min-height: 470px; display: flex; flex-direction: column; }
.bfs-step { display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.bfs-step:focus { outline: none; }
.bfs-label { font-weight: 600; font-size: 1rem; margin-bottom: -6px; }
.bfs-small { font-size: .82rem; line-height: 1.5; color: var(--bfs-soft); margin: 0; }
.bfs-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bfs-soft); margin: 0 0 6px; }

#contact.bfs textarea.bfs-need { width: 100%; box-sizing: border-box; font: 1.05rem/1.6 var(--font); color: var(--navy); background: #fff;
  border: 1.5px solid var(--bfs-line); border-radius: 16px; padding: 14px 16px; resize: vertical; min-height: 150px; margin: 0; }
.bfs-hint { margin: -8px 0 0; }
.bfs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bfs-chips > span { font-size: .875rem; font-weight: 600; color: var(--bfs-soft); margin-right: 4px; }
.bfs-chip { font: 500 .875rem var(--font); color: var(--navy); background: #fff; border: 1px solid var(--bfs-hair); border-radius: 200px; padding: 8px 14px; min-height: 44px; cursor: pointer; }
.bfs-chip:hover { border-color: var(--navy); }
.bfs-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.bfs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: auto; padding-top: 8px; }
.bfs-row .bfs-small { max-width: 40ch; }
.bfs .bfs-btn { font: 600 1rem var(--font); color: #fff; background: var(--navy); border: 0; border-radius: 200px; padding: 0 26px; min-height: 52px; cursor: pointer; transition: background-color .2s; }
.bfs .bfs-btn:hover { background: var(--blue); }
.bfs .bfs-link { font: 600 .95rem var(--font); color: var(--navy); background: none; border: 0; padding: 10px 2px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.bfs-error { color: #b00020; font-weight: 600; font-size: .9rem; margin: -6px 0 0; }

/* Thinking */
.bfs-thinking { align-items: center; justify-content: center; text-align: center; min-height: 380px; }
.bfs-dots { display: flex; gap: 8px; }
.bfs-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); animation: bfs-pulse 1.2s infinite ease-in-out; }
.bfs-dots span:nth-child(2) { animation-delay: .15s; } .bfs-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bfs-pulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .bfs-dots span { animation: none; opacity: .6; } }

/* Suggestions */
.bfs-result { gap: 20px; }
.bfs-heard { font-size: 1.125rem; line-height: 1.45; margin: 0; }
.bfs-services { list-style: none; margin: 0; padding: 0; background: var(--bfs-hair); border: 1px solid var(--bfs-hair); border-radius: 16px; overflow: hidden; display: grid; gap: 1px; }
.bfs-services li { background: #fff; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: baseline; justify-content: space-between; }
.bfs-services li > div { flex: 1 1 240px; }
.bfs-tag { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }
.bfs-name { display: block; font-weight: 600; font-size: 1.06rem; }
.bfs-why { display: block; font-size: .95rem; line-height: 1.5; color: var(--bfs-soft); margin-top: 2px; }
.bfs-services a { font-weight: 600; font-size: .95rem; line-height: 1.4; text-underline-offset: 3px; color: var(--navy); }
.bfs-price { margin: 0; font-size: .95rem; line-height: 1.5; background: #fff; border: 1px solid var(--bfs-hair); border-radius: 12px; padding: 14px 20px; }
.bfs-price strong, .bfs-work strong { font-weight: 600; }
.bfs-work { margin: 0; font-size: .95rem; line-height: 1.6; }
.bfs-work a { font-weight: 600; color: var(--navy); text-underline-offset: 3px; }
.bfs-work .bfs-meta { color: var(--bfs-soft); }
.bfs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: auto; padding-top: 4px; }

/* Details form: floating labels (the label sits in the box, then moves up – it never disappears) */
.bfs .bfs-form { display: flex; flex-direction: column; gap: 12px; flex-grow: 1; max-width: none; margin: 0; }
.bfs-lead { margin: 0 0 4px; font-weight: 600; font-size: 1.06rem; }
.bfs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.bfs-fl { position: relative; margin: 0; }
#contact.bfs .bfs-fl input, #contact.bfs .bfs-fl select, #contact.bfs .bfs-fl textarea { display: block; width: 100%; box-sizing: border-box; font: 1rem var(--font); color: var(--navy);
  background: #fff; border: 1.5px solid var(--bfs-line); border-radius: 12px; margin: 0; box-shadow: none; }
#contact.bfs .bfs-fl input, #contact.bfs .bfs-fl select { height: 56px; min-height: 0; padding: 22px 14px 6px; }
#contact.bfs .bfs-fl select { cursor: pointer; padding-right: 40px; }
#contact.bfs .bfs-fl textarea { padding: 32px 14px 10px; line-height: 1.5; font-size: .95rem; resize: vertical; min-height: 140px; }
.bfs-fl label { position: absolute; left: 15px; top: 17px; font-size: 1rem; color: var(--bfs-soft); pointer-events: none; transition: top .15s, font-size .15s; }
.bfs-fl input:focus + label, .bfs-fl input:not(:placeholder-shown) + label, .bfs-fl-select label { top: 7px; font-size: .75rem; font-weight: 600; color: var(--navy); }
.bfs-fl input::placeholder, .bfs-fl textarea::placeholder { color: transparent; }
.bfs-fl-area label { left: 2px; right: 18px; top: 2px; padding: 7px 13px 5px; font-size: .75rem; font-weight: 600; color: var(--navy); background: #fff; border-radius: 10px 0 0 0; z-index: 1; }
#contact.bfs .bfs-fl input:focus, #contact.bfs .bfs-fl select:focus, #contact.bfs .bfs-fl textarea:focus, #contact.bfs textarea.bfs-need:focus { border-color: var(--blue); outline: 3px solid rgba(0,72,254,.25); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .bfs-fl label { transition: none; } }
.bfs .bfs-check { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9rem; font-weight: 400; color: var(--navy); }
.bfs .bfs-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); flex: none; }
.bfs-send-row { align-items: stretch; }
.bfs-send-row .bfs-btn { width: 100%; min-height: 56px; }
.bfs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px; margin-top: auto; padding-top: 4px; }
.bfs-foot .bfs-small { flex: 1 1 240px; }
.bfs-foot a { color: inherit; }
.bfs .form-status { margin: 0; min-height: 0; font-size: .95rem; }
.bfs .form-status:empty { display: none; }

/* Sent */
.bfs-sent { align-items: center; justify-content: center; text-align: center; min-height: 380px; }
.bfs-sent svg { display: block; margin: 0 auto 4px; }
.bfs-sent h3 { font-size: 1.6rem; line-height: 1.25; font-weight: 400; margin: 0; }
.bfs-sent p { margin: 0; max-width: 40ch; }

/* Phones */
@media (max-width: 640px) {
  .bfs-panel { padding: 16px; border-radius: 20px; }
  .bfs-js .bfs-panel { min-height: 0; }
  .bfs .bfs-intro { font-size: 1rem; }
  .bfs-js.bfs-later .bfs-intro { display: none; }
  .bfs-grid { gap: 10px; }
  .bfs-span-m { grid-column: 1 / -1; }
  .bfs-send-row { grid-template-columns: minmax(0, 1fr); }
  .bfs-thinking, .bfs-sent { min-height: 260px; }
}

/* Phones: the starter opens in a panel that slides up, like the menu – white, with the light blue box */
.bfs-sheet { display: none; }
@media (max-width: 860px) {
  .bfs-sheet { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(0,3,45,.45); }
  .bfs-sheet[hidden] { display: none; }
  .bfs-sheet-in { position: absolute; left: 0; right: 0; bottom: 0; top: 56px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 24px 24px 0 0; padding: 32px 20px calc(120px + env(safe-area-inset-bottom)); animation: shUp .35s cubic-bezier(.2,.8,.2,1); }
  .bfs-grab { position: absolute; left: 50%; top: 10px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #dfe2ef; }
  /* Same place and shape as the menu's bar, in the light style of the floating pill: Menu where the pill has it, Close on the right like the menu */
  .bfs-sheet-bar { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2; height: 64px; box-sizing: border-box; padding: 6px;
    display: flex; align-items: center; justify-content: space-between; gap: 6px; border-radius: 999px; background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid #dfe2ef; box-shadow: 0 12px 32px rgba(0,3,45,.18); }
  .bfs-sheet-bar { transform-origin: 50% 100%; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .bfs-sheet-bar.is-small { transform: scale(.92); }
  .bfs-sheet-menu, .bfs-sheet-close { flex: none; height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 8px; font: 600 .95rem var(--font); color: var(--navy); background: none; border: 0; border-radius: 999px; cursor: pointer; }
  .bfs-sheet-close { padding: 0 18px; }
  .bfs-sheet-menu:focus-visible, .bfs-sheet-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .bfs-sheet #contact.bfs { padding: 0 !important; margin: 0; }
  .bfs-sheet #contact.bfs .wrap { padding: 0; max-width: none; }
  .bfs-sheet .bfs-cols { gap: 20px; }
  .bfs-sheet .bfs-side h2 { font-size: 2.1rem; line-height: 1.08; }
  html.bfs-open .sh-pill { visibility: hidden; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { .bfs-sheet-in { animation: none; } .bfs-sheet-bar { transition: none; } }
