/* ─── FUNNEL OVERLAY ──────────────────────────────────────── */
.funnel-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 26, 23, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.funnel-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ─── MODAL SHELL ─────────────────────────────────────────── */
.funnel-modal {
  background: var(--color-offwhite);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(14, 26, 23, 0.5);
  position: relative;
}

/* ─── STATE VISIBILITY ────────────────────────────────────── */
.funnel-state {
  display: none;
}
.funnel-modal[data-current="step-1"]   [data-state="step-1"]   { display: block; }
.funnel-modal[data-current="step-2"]   [data-state="step-2"]   { display: block; }
.funnel-modal[data-current="thank-you"] [data-state="thank-you"] { display: block; }

/* ─── HEADER ──────────────────────────────────────────────── */
.funnel-header {
  background: var(--color-midnight);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.funnel-header--3col {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}
.funnel-header--3col .funnel-header__brand {
  justify-self: center;
}
.funnel-header--3col .funnel-header__close,
.funnel-header--3col > :last-child {
  justify-self: end;
}

.funnel-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-offwhite);
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.funnel-header__mark {
  display: block;
  width: 2px;
  height: 18px;
  background: var(--color-brass);
  flex-shrink: 0;
}
.funnel-header__close,
.funnel-header__back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-offwhite);
  padding: 8px;
  margin: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.funnel-header__close:hover,
.funnel-header__back:hover {
  opacity: 0.7;
}

/* ─── PROGRESS ────────────────────────────────────────────── */
.funnel-progress {
  padding: 14px 24px 0;
}
.funnel-progress__label {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-taupe);
  text-align: center;
  margin: 0 0 8px;
}
.funnel-progress__bar {
  width: 100%;
  height: 2px;
  background: rgba(182, 161, 138, 0.35);
  position: relative;
  border-radius: 2px;
}
.funnel-progress__fill {
  position: absolute;
  inset-block: 0;
  left: 0;
  background: var(--color-brass);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ─── BODY ────────────────────────────────────────────────── */
.funnel-body {
  padding: 24px;
}
.funnel-state-heading {
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-midnight);
  margin: 0 0 20px;
}

/* ─── FIELD LABELS & INPUTS ───────────────────────────────── */
.funnel-field-label {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-midnight);
  display: block;
  margin: 20px 0 8px;
}
.funnel-field-label:first-child,
.funnel-body > .funnel-field-label:first-child {
  margin-top: 0;
}
.funnel-field-wrap {
  position: relative;
}
.funnel-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-midnight);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-midnight);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.funnel-input::placeholder {
  color: rgba(14, 26, 23, 0.4);
}
.funnel-input:focus {
  border-color: var(--color-brass);
}
.funnel-input.has-error {
  border-color: #c0392b;
}
.funnel-error {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 300;
  color: #c0392b;
  margin: 4px 0 0;
  display: none;
}
.funnel-error.is-visible {
  display: block;
}

/* ─── TILE GRIDS ──────────────────────────────────────────── */
.funnel-tile-grid--3,
.funnel-tile-grid--2x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.funnel-tile-wrap {
  position: relative;
}
.funnel-tile-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.funnel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  cursor: pointer;
  border: 1px solid rgba(14, 26, 23, 0.25);
  border-radius: 4px;
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-midnight);
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  line-height: 1.3;
  user-select: none;
  -webkit-user-select: none;
}
.funnel-tile-input:checked + .funnel-tile {
  border-color: var(--color-brass);
  background: rgba(176, 141, 87, 0.08);
}
.funnel-tile-input:focus-visible + .funnel-tile {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}
.funnel-tile:hover {
  border-color: rgba(14, 26, 23, 0.5);
}
.funnel-tile-input:checked + .funnel-tile:hover {
  border-color: var(--color-brass);
}

/* ─── RADIO LIST (window count) ───────────────────────────── */
.funnel-radio-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.funnel-radio-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-midnight);
  position: relative;
}
.funnel-radio-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 18px;
  height: 18px;
  margin: 0;
}
.funnel-radio-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-midnight);
  flex-shrink: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.funnel-radio-input:checked ~ .funnel-radio-circle {
  border-color: var(--color-brass);
  background: var(--color-brass);
  box-shadow: inset 0 0 0 3px var(--color-offwhite);
}
.funnel-radio-input:focus-visible ~ .funnel-radio-circle {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

/* ─── SOCIAL PROOF ────────────────────────────────────────── */
.funnel-social-proof {
  background: rgba(182, 161, 138, 0.15);
  border-radius: 4px;
  padding: 12px 14px;
  margin-top: 16px;
}
.funnel-social-proof__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.funnel-social-proof__stars {
  color: var(--color-brass);
  font-size: 14px;
  letter-spacing: 0.1em;
}
.funnel-social-proof__name {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-midnight);
}
.funnel-social-proof__quote {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 13px;
  font-weight: 300;
  color: var(--color-midnight);
  margin: 6px 0 0;
  line-height: 1.5;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.funnel-btn {
  display: block;
  width: 100%;
  height: 52px;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-top: 20px;
  border-radius: 0;
  transition: opacity 0.2s;
  text-align: center;
  line-height: 52px;
  text-decoration: none;
  box-sizing: border-box;
}
.funnel-btn:hover {
  opacity: 0.85;
}
.funnel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.funnel-btn--brass {
  background: var(--color-brass);
  color: var(--color-midnight);
}
.funnel-btn--dark {
  background: var(--color-midnight);
  color: var(--color-offwhite);
}
.funnel-btn--outline {
  background: transparent;
  border: 1px solid var(--color-midnight);
  color: var(--color-midnight);
}

/* ─── FOOT (back + note row) ──────────────────────────────── */
.funnel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.funnel-foot__note {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 300;
  color: var(--color-taupe);
  text-align: center;
  flex: 1;
  margin: 0;
}
.funnel-back {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-taupe);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.funnel-back:hover {
  color: var(--color-midnight);
}
.funnel-back--hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── THANK YOU STATE ─────────────────────────────────────── */
.funnel-thank-you {
  text-align: center;
  padding: 32px 24px;
}
.funnel-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--color-brass);
  display: block;
}
.funnel-thankyou-heading {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-midnight);
  margin: 0 0 12px;
}
.funnel-thankyou-sub {
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-midnight);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 360px;
}
.funnel-thankyou-call {
  margin-top: 12px;
}

/* ─── NEXT STEPS BOX ──────────────────────────────────────── */
.funnel-next-steps {
  background: rgba(182, 161, 138, 0.15);
  border-radius: 4px;
  padding: 16px;
  margin-top: 20px;
  text-align: left;
}
.funnel-next-steps__heading {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin: 0 0 14px;
}
.funnel-next-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(182, 161, 138, 0.3);
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-midnight);
  line-height: 1.4;
}
.funnel-next-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.funnel-next-step svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-brass);
}

/* ─── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 520px) {
  .funnel-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .funnel-modal {
    border-radius: 6px 6px 0 0;
    max-height: 96vh;
  }
  .funnel-tile-grid--2x3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .funnel-social-proof__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
