/* ============================================
   Grunt landing page — custom styles
   ============================================ */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
section[id] { scroll-margin-top: 6rem; }

/* ---------- Mobile density tuning ---------- */
@media (max-width: 640px) {
  html { font-size: 15px; }
  body { font-weight: 400; }
  .font-black { font-weight: 700; }
  .font-extrabold { font-weight: 600; }
  .py-24 { padding-top: 3rem; padding-bottom: 3rem; }
  .py-20 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .pt-20 { padding-top: 2.5rem; }
  .pb-24 { padding-bottom: 3rem; }
  .pb-20 { padding-bottom: 2.5rem; }
  .text-6xl { font-size: 3rem !important; line-height: 1.1; }
  .text-5xl { font-size: 3rem !important; line-height: 1.1; }
  .text-4xl { font-size: 2.25rem !important; line-height: 1.15; }
  .text-3xl { font-size: 1.875rem !important; line-height: 1.2; }
  .text-2xl { font-size: 1.5rem !important; }
  .text-xl { font-size: 1.25rem !important; }
  .sm\:whitespace-nowrap { white-space: normal; }
  .gap-16 { gap: 2.5rem; }
  .mt-14 { margin-top: 2rem; }
  .mt-10 { margin-top: 1.5rem; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .font-black { font-weight: 700; }
}

/* ---------- Logo marquee (hero strip) ---------- */
.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
.logo-track {
  display: flex; gap: 4rem; width: max-content;
  animation: scroll-x 30s linear infinite; align-items: center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
@media (min-width: 640px) {
  .logo-track { gap: 4rem; }
}
.logo-pill {
  color: rgba(15, 20, 34, 0.35);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  filter: grayscale(1);
}
.logo-img {
  flex: 0 0 auto;
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
}
.logo-link {
  flex: 0 0 auto;
  display: inline-flex;
  line-height: 0;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logo-link:hover .logo-img,
.logo-link:focus-visible .logo-img {
  filter: grayscale(0);
  opacity: 1;
}
.logo-link:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 4px;
  border-radius: 4px;
}
@media (min-width: 640px) {
  .logo-img {
    height: 48px;
    max-width: 200px;
  }
}
@keyframes scroll-x {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Examples marquee (cards) ---------- */
.examples-marquee {
  overflow: visible;
  height: 340px;
  padding: 1rem 0 0;
  margin-bottom: -3rem;
}
.examples-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding-left: 1rem;
  animation: scroll-x 50s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.examples-track:hover { animation-play-state: paused; }

.example-card {
  position: relative;
  flex: 0 0 auto;
  height: 400px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15,20,34,0.08);
  background: #ffffff;
}

@media (min-width: 640px) {
  .examples-marquee {
    height: 460px;
    margin-bottom: -6rem;
  }
  .examples-track {
    gap: 1.5rem;
    padding-left: 1.5rem;
  }
  .example-card {
    height: 540px;
    border-radius: 28px;
  }
}
.example-card img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.phone-mini {
  margin-top: auto;
  background: #0f1422;
  border-radius: 28px;
  padding: 6px;
  width: 180px;
  align-self: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.phone-mini-screen {
  border-radius: 22px;
  height: 280px;
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
}

/* ---------- Feature cards (Start Building grid) ---------- */
.feature-card {
  border-radius: 20px;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
  border: 1px solid rgba(15, 20, 34, 0.04);
}
.feature-card:hover {
  box-shadow: 0 6px 16px rgba(15,20,34,0.05);
}
.feature-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ---------- Feature category cards (detailed Features grid) ---------- */
.feature-cat {
  position: relative;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.feature-cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 20, 34, 0.06);
}
.feature-cat-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1.4;
}
.feature-bullet {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
}

/* ---------- Underline accent ---------- */
h1 .relative svg path {
  filter: drop-shadow(0 1px 0 rgba(244,123,63,0.15));
}

/* ---------- Smooth focus rings ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #f47b3f;
  outline-offset: 3px;
  border-radius: 999px;
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .logo-track, .examples-track { animation: none; }
}

/* ============================================
   Expert modal
   ============================================ */
.expert-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.expert-modal.is-open { display: flex; }

.expert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 34, 0.4);
  backdrop-filter: blur(2px);
  animation: expertFade 180ms ease-out;
}

.expert-modal__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 20, 34, 0.18);
  animation: expertPop 220ms cubic-bezier(.2,.9,.3,1.2);
}

.expert-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(15, 20, 34, 0.06);
}
.expert-modal__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: rgba(15, 20, 34, 0.65);
  font-weight: 500;
}
.expert-modal__status strong { color: rgba(15, 20, 34, 0.85); font-weight: 600; }
.expert-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}
.expert-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 20, 34, 0.45);
  transition: background 0.15s, color 0.15s;
}
.expert-modal__close:hover {
  background: rgba(15, 20, 34, 0.05);
  color: #0f1422;
}

.expert-modal__body {
  padding: 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.expert-modal__intro {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.expert-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f1422;
  line-height: 1.2;
}
.expert-modal__subtitle {
  font-size: 0.85rem;
  color: rgba(15, 20, 34, 0.55);
  line-height: 1.4;
}

.expert-grid { display: grid; gap: 0.5rem; }
.expert-grid--2 { grid-template-columns: 1fr 1fr; }
.expert-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.expert-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.expert-field__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(15, 20, 34, 0.75);
}

.expert-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  border: 1px solid rgba(15, 20, 34, 0.12);
  background: #fff;
  font-size: 0.85rem;
  color: #0f1422;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.expert-input::placeholder { color: rgba(15, 20, 34, 0.32); }
.expert-input:focus {
  outline: none;
  border-color: rgba(15, 20, 34, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 20, 34, 0.06);
}

.expert-chip {
  width: 100%;
  padding: 0.6rem 0.5rem;
  border-radius: 9px;
  border: 1px solid rgba(15, 20, 34, 0.12);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(15, 20, 34, 0.8);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.expert-chip:hover {
  border-color: rgba(15, 20, 34, 0.28);
  background: rgba(15, 20, 34, 0.015);
}
.expert-chip.is-selected {
  border-color: #0f1422;
  background: #0f1422;
  color: #fff;
}

.expert-submit {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  background: #0f1422;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, transform 0.05s;
}
.expert-submit:hover { background: #1c2237; }
.expert-submit:active { transform: translateY(1px); }

@keyframes expertFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes expertPop {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .expert-modal { padding: 0.75rem; }
  .expert-modal__panel { border-radius: 16px; }
  .expert-modal__body { padding: 1rem; gap: 0.9rem; }
  .expert-modal__title { font-size: 1.15rem; }
  .expert-grid--2 { grid-template-columns: 1fr; }
  .expert-grid--3 { grid-template-columns: 1fr; }
}
.expert-modal.is-open { display: flex; }

.expert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 34, 0.45);
  backdrop-filter: blur(2px);
  animation: expertFade 180ms ease-out;
}

.expert-modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 20, 34, 0.25);
  animation: expertPop 220ms cubic-bezier(.2,.9,.3,1.2);
}

.expert-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(15, 20, 34, 0.06);
}
.expert-modal__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(15, 20, 34, 0.7);
}
.expert-modal__status strong { color: #0f1422; font-weight: 600; }
.expert-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}
.expert-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 20, 34, 0.55);
  transition: background 0.15s, color 0.15s;
}
.expert-modal__close:hover {
  background: rgba(15, 20, 34, 0.06);
  color: #0f1422;
}

.expert-modal__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.expert-modal__intro { display: flex; flex-direction: column; gap: 0.2rem; }
.expert-modal__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f1422;
  line-height: 1.25;
}
.expert-modal__subtitle {
  font-size: 0.85rem;
  color: rgba(15, 20, 34, 0.6);
}

.expert-grid { display: grid; gap: 0.5rem; }
.expert-grid--2 { grid-template-columns: 1fr 1fr; }
.expert-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.expert-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.expert-field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f1422;
}

.expert-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 20, 34, 0.12);
  background: #fff;
  font-size: 0.9rem;
  color: #0f1422;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.expert-input::placeholder { color: rgba(15, 20, 34, 0.35); }
.expert-input:focus {
  outline: none;
  border-color: #0f1422;
  box-shadow: 0 0 0 3px rgba(15, 20, 34, 0.08);
}

.expert-chip {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 20, 34, 0.12);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  color: #0f1422;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.expert-chip:hover {
  border-color: rgba(15, 20, 34, 0.3);
  background: rgba(15, 20, 34, 0.02);
}
.expert-chip.is-selected {
  border-color: #0f1422;
  background: #0f1422;
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 20, 34, 0.18);
}

.expert-submit {
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: #0f1422;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.05s;
}
.expert-submit:hover { background: #1c2237; }
.expert-submit:active { transform: translateY(1px); }

@keyframes expertFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes expertPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Live expert count flash (feels like real reps coming online/offline) */
#expertCount {
  display: inline-block;
  transition: color .35s ease;
}
.expert-count--flash {
  animation: expertCountFlash .9s cubic-bezier(.2,.7,.2,1);
}
@keyframes expertCountFlash {
  0%   { transform: translateY(-6px); opacity: 0; color: #0f1422; }
  35%  { transform: translateY(0);    opacity: 1; color: #0f1422; }
  100% { transform: translateY(0);    opacity: 1; color: #0f1422; }
}
.expert-modal__dot { transition: box-shadow .4s ease, background .4s ease; }

@media (max-width: 520px) {
  .expert-modal {
    padding: 0;
    align-items: flex-end;
    height: var(--vv-h, 100vh);
    top: var(--vv-top, 0px);
    transition: height 0.2s ease;
  }
  .expert-modal__panel {
    max-width: 100%;
    max-height: var(--vv-h, 92vh);
    border-radius: 20px 20px 0 0;
    animation: expertSlideUp 320ms cubic-bezier(.2,.9,.3,1);
  }
  .expert-modal__header { padding: 0.7rem 1rem; }
  .expert-modal__status { font-size: 0.78rem; }
  .expert-modal__body { padding: 1rem; gap: 0.7rem; }
  .expert-modal__title { font-size: 1.1rem; }
  .expert-modal__subtitle { font-size: 0.8rem; }
  .expert-step__heading { font-size: 0.78rem; }
  .expert-field { gap: 0.3rem; }
  .expert-field__label { font-size: 0.78rem; }
  .expert-input { padding: 0.65rem 0.8rem; font-size: 16px; border-radius: 10px; }
  .expert-chip { padding: 0.7rem 0.85rem; font-size: 0.85rem; }
  .expert-grid--2 { grid-template-columns: 1fr; }
  .expert-grid--3 { grid-template-columns: 1fr; }
  .expert-modal__footer {
    padding: 0.7rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
    gap: 0.5rem;
  }
  .expert-back { padding: 0.75rem 0.9rem; font-size: 0.85rem; }
  .expert-next, .expert-submit { padding: 0.85rem 1rem; font-size: 0.95rem; }
}

@keyframes expertSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.expert-error {
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
  font-weight: 500;
  color: #c1182b;
  margin-top: 0.1rem;
}
.expert-error:empty { display: none; }

.expert-input--error,
.expert-input--error:focus {
  border-color: #c1182b;
  box-shadow: 0 0 0 3px rgba(193, 24, 43, 0.12);
}

.expert-field--invalid .expert-chip:not(.is-selected) {
  border-color: rgba(193, 24, 43, 0.4);
}

.expert-form-status {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}
.expert-form-status:empty { display: none; }
.expert-form-status.is-error { color: #c1182b; }
.expert-form-status.is-success { color: #0d8a4e; }

.expert-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Multi-step form ---------- */
.expert-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.expert-progress {
  height: 3px;
  background: rgba(15, 20, 34, 0.06);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.expert-progress__fill {
  display: block;
  height: 100%;
  width: 33.333%;
  background: #0f1422;
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(.2,.9,.3,1);
}

.expert-step {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: expertStepIn 0.25s ease-out;
}
.expert-step[hidden] { display: none; }
.expert-step__heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f1422;
  letter-spacing: 0.01em;
  margin: 0;
}

@keyframes expertStepIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.expert-modal__footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid rgba(15, 20, 34, 0.06);
  background: #ffffff;
  flex: 0 0 auto;
}

.expert-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: transparent;
  color: rgba(15, 20, 34, 0.7);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}
.expert-back:hover { background: rgba(15, 20, 34, 0.05); color: #0f1422; }
.expert-back:active { transform: translateY(1px); }

.expert-next {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  background: #0f1422;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.05s;
}
.expert-next:hover { background: #1c2237; }
.expert-next:active { transform: translateY(1px); }
.expert-next:disabled { opacity: 0.7; cursor: not-allowed; pointer-events: none; }

/* ============== BUILD MY APP MODAL ============== */
.bam {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}
.bam.is-open { display: flex; }

.bam__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 34, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: bam-fade-in 0.18s ease-out;
}

.bam__panel {
  position: relative;
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(15, 20, 34, 0.25);
  overflow: hidden;
  animation: bam-pop-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bam-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bam-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.bam__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(15, 20, 34, 0.06);
  background: #faf6f0;
}
.bam__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(15, 20, 34, 0.7);
  flex: 0 0 auto;
}
.bam__brand strong { color: #0f1422; font-weight: 600; }
.bam__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: #9be0a4;
  box-shadow: 0 0 0 3px rgba(155, 224, 164, 0.25);
  animation: bam-pulse 1.6s ease-in-out infinite;
}
@keyframes bam-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(155, 224, 164, 0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(155, 224, 164, 0.05); }
}
.bam__progress {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}
.bam__progress-dot {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 20, 34, 0.1);
  transition: background 0.25s;
}
.bam__progress-dot.is-active { background: #f47b3f; }
.bam__progress-dot.is-current { box-shadow: 0 0 0 3px rgba(244, 123, 63, 0.18); }

.bam__close {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: rgba(15, 20, 34, 0.6);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  flex: 0 0 auto;
}
.bam__close:hover { background: rgba(15, 20, 34, 0.08); color: #0f1422; }

/* Body + steps */
.bam__form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.bam__body {
  padding: 1.4rem 1.4rem 0.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bam-step { display: flex; flex-direction: column; gap: 0.85rem; }
.bam-step[hidden] { display: none; }

.bam-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3b82f6;
  margin: 0;
}
.bam-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f1422;
  margin: 0;
  letter-spacing: -0.01em;
}
.bam-sub {
  font-size: 0.92rem;
  color: rgba(15, 20, 34, 0.65);
  margin: 0;
  line-height: 1.5;
}

/* Typing animation hint */
.bam-typing {
  background: #faf6f0;
  border: 1px solid rgba(15, 20, 34, 0.06);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 1.02rem;
  line-height: 1.4;
  color: rgba(15, 20, 34, 0.55);
  font-weight: 500;
}
.bam-typing__static { color: rgba(15, 20, 34, 0.7); }
.bam-typing__dynamic {
  display: inline-flex;
  align-items: baseline;
  color: #0f1422;
  font-weight: 700;
  min-width: 0;
  position: relative;
}
.bam-typing__text { white-space: pre; }
.bam-typing__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: #f47b3f;
  margin-left: 2px;
  vertical-align: -2px;
  animation: bam-caret 1s steps(2) infinite;
}
@keyframes bam-caret { 50% { opacity: 0; } }

/* Fields */
.bam-field { display: flex; flex-direction: column; gap: 0.4rem; }
.bam-field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f1422;
}
.bam-input,
.bam-textarea,
.bam-select {
  width: 100%;
  border: 1.5px solid rgba(15, 20, 34, 0.12);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: #0f1422;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}
.bam-textarea { min-height: 88px; line-height: 1.5; }
.bam-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230f1422' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 14px 14px;
  cursor: pointer;
}
.bam-input::placeholder,
.bam-textarea::placeholder { color: rgba(15, 20, 34, 0.4); }
.bam-input:focus,
.bam-textarea:focus,
.bam-select:focus {
  outline: none;
  border-color: #f47b3f;
  box-shadow: 0 0 0 3px rgba(244, 123, 63, 0.18);
}
.bam-input--error,
.bam-textarea.bam-input--error,
.bam-select.bam-input--error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.bam-error {
  font-size: 0.78rem;
  color: #dc2626;
  min-height: 0.9em;
}
.bam-grid { display: grid; gap: 0.85rem; }
.bam-grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .bam-grid--2 { grid-template-columns: 1fr; } }

/* Example chips */
.bam-examples { display: flex; flex-direction: column; gap: 0.55rem; }
.bam-examples__label {
  font-size: 0.78rem;
  color: rgba(15, 20, 34, 0.55);
  margin: 0;
  font-weight: 500;
}
.bam-examples__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bam-chip {
  border: 1.5px solid rgba(15, 20, 34, 0.1);
  background: #fff;
  color: #0f1422;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.bam-chip:hover {
  border-color: #f47b3f;
  background: rgba(244, 123, 63, 0.06);
}
.bam-chip:active { transform: translateY(1px); }

/* Spend (budget) options — radio cards */
.bam-spend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  border: 0;
  padding: 0;
  margin: 0;
}
.bam-spend__opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(15, 20, 34, 0.1);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.bam-spend__opt:hover {
  border-color: #f47b3f;
  background: rgba(244, 123, 63, 0.04);
}
.bam-spend__opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bam-spend__opt:has(input:checked) {
  border-color: #f47b3f;
  background: rgba(244, 123, 63, 0.08);
  box-shadow: 0 0 0 3px rgba(244, 123, 63, 0.12);
}
.bam-spend__amt {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f1422;
}

/* Recap on contact step */
.bam-recap {
  position: relative;
  background: #faf6f0;
  border: 1px solid rgba(15, 20, 34, 0.06);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.bam-recap__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
}
.bam-recap__label {
  flex: 0 0 80px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 20, 34, 0.5);
}
.bam-recap__val {
  color: #0f1422;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bam-recap__edit {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f47b3f;
  background: transparent;
  border: 0;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}
.bam-recap__edit:hover { background: rgba(244, 123, 63, 0.08); }

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes bam-spin { to { transform: rotate(360deg); } }

/* Form status (success/error on submit) */
.bam-form-status {
  font-size: 0.88rem;
  min-height: 1.2em;
  text-align: center;
  margin: 0.25rem 0 0;
}
.bam-form-status.is-success { color: #16a34a; }
.bam-form-status.is-error   { color: #dc2626; }

/* Footer */
.bam__footer {
  display: flex;
  gap: 0.6rem;
  padding: 1rem 1.4rem 1.2rem;
  border-top: 1px solid rgba(15, 20, 34, 0.06);
  background: #fff;
  margin-top: 0.5rem;
}
.bam-back,
.bam-next,
.bam-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.05s, opacity 0.15s;
  font-family: inherit;
  border: 0;
  cursor: pointer;
}
.bam-back {
  background: transparent;
  color: rgba(15, 20, 34, 0.7);
  border: 1.5px solid rgba(15, 20, 34, 0.12);
}
.bam-back:hover { background: rgba(15, 20, 34, 0.05); color: #0f1422; }
.bam-back[hidden] { display: none; }
.bam-next,
.bam-submit {
  flex: 1;
  background: #f47b3f;
  color: #fff;
}
.bam-next:hover,
.bam-submit:hover { background: #ea6a2a; }
.bam-next:active,
.bam-submit:active { transform: translateY(1px); }
.bam-next:disabled,
.bam-submit:disabled { opacity: 0.7; cursor: not-allowed; pointer-events: none; }
.bam-submit.is-loading { position: relative; }
.bam-submit.is-loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: bam-spin 0.7s linear infinite;
}

/* Mobile */
@media (max-width: 640px) {
  .bam {
    padding: 0;
    align-items: flex-end;
    height: var(--vv-h, 100vh);
    top: var(--vv-top, 0px);
    transition: height 0.2s ease, top 0.2s ease;
  }
  .bam__panel {
    max-width: 100%;
    width: 100%;
    max-height: var(--vv-h, 92vh);
    border-radius: 22px 22px 0 0;
    /* Subtle grab handle for the bottom sheet */
  }
  .bam__panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(15, 20, 34, 0.15);
    border-radius: 999px;
    margin: 8px auto 0;
  }
  .bam__body { padding: 1rem 1.1rem 0.5rem; }
  .bam-title { font-size: 1.2rem; }
  .bam__footer { padding: 0.8rem 1.1rem max(0.9rem, env(safe-area-inset-bottom)); }
  .bam__header { padding: 0.7rem 0.9rem; }
  .bam__brand { font-size: 0.75rem; }
  .bam__brand span:last-child { display: none; } /* hide "a few quick questions" on small */
  .bam__progress-dot { width: 18px; }
  .bam-textarea { min-height: 72px; font-size: 16px; } /* 16px prevents iOS zoom */
  .bam-input { font-size: 16px; }
  .bam-typing { font-size: 0.95rem; padding: 0.75rem 0.85rem; }
  .bam-chip { font-size: 0.78rem; padding: 0.55rem 0.85rem; }
  .bam-spend { grid-template-columns: 1fr; }
  .bam-recap__edit { position: static; align-self: flex-end; margin-top: 0.1rem; }
  .bam-recap__row { font-size: 0.82rem; }
  .bam-grid--2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bam__backdrop, .bam__panel, .bam-typing__caret, .bam__dot { animation: none; }
}
