/* =========================================================
   "LET'S TALK" CONTACT FORM — modal popup
   =========================================================
   Every single class here is prefixed with "cf-" on purpose.
   Last time, .services-grid (a generic name) collided with
   the site's own .services-grid (the "Why Choose" card grid)
   and silently overwrote it. Prefixing removes that risk for
   good, even against CSS files not shown to me (mobile.css,
   team-card.css, beam-button.css).

   Visual design is unchanged from the version you approved —
   only the class names and the modal wrapper are new.
   ========================================================= */

.cf-card {
  /* Design tokens — change these once, they update everywhere */
  --cf-dark: #2d2f35;
  --cf-gray-text: #707684;
  --cf-placeholder: #a9acb5;
  --cf-input-bg: #f0f0f0;
  --cf-chip-bg: #f2f2f2;
  --cf-button-bg: #1c1d21;
  --cf-button-text: #edeef5;
  --cf-radius-lg: 24px;
  --cf-radius-md: 12px;
  --cf-font-display: 'Phudu', sans-serif;
  --cf-font-body: 'Manrope', sans-serif;
}

.cf-card * {
  box-sizing: border-box;
}

/* ---------- Modal overlay / backdrop ---------- */

.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* toggled to "flex" by contact-form.js */
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 14, 15, 0.55);

  /* Scrollable as a safety net on very short screens, but the
     scrollbar itself is hidden so it never looks like the popup
     you didn't want (no visible slider). */
  overflow-y: auto;
  scrollbar-width: none;

  opacity: 0;
  transition: opacity 0.25s ease;
}

.cf-overlay::-webkit-scrollbar {
  display: none;
}

.cf-overlay.is-open {
  opacity: 1;
}

/* Locks background scroll while the modal is open */
body.cf-modal-open {
  overflow: hidden;
}

/* ---------- Card ---------- */

.cf-card {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: auto;
  background: #ffffff;
  border-radius: var(--cf-radius-lg);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: var(--cf-font-body);

  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.cf-overlay.is-open .cf-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ---------- Close button ---------- */

.cf-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--cf-input-bg);
  color: var(--cf-dark);
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.15s ease, background 0.15s ease;
}

.cf-close:hover {
  transform: scale(1.1);
  background: #e6e6e6;
}

.cf-close:active {
  transform: scale(0.94);
}

.cf-close:focus-visible {
  outline: 2px solid var(--cf-dark);
  outline-offset: 2px;
}

.cf-close svg {
  width: 16px;
  height: 16px;
}

/* ---------- Heading ---------- */

.cf-heading-group {
  text-align: center;
  margin-bottom: 8px;
}

.cf-heading {
  font-family: var(--cf-font-display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--cf-dark);
  margin: 0 0 12px;
}

.cf-subheading {
  font-family: var(--cf-font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--cf-gray-text);
  margin: 0;
}

/* ---------- Field rows / groups ---------- */

.cf-fields-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

.cf-field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cf-label {
  display: block;
  font-family: var(--cf-font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--cf-dark);
  padding: 0;
  border: 0;
  margin: 0;
}

.cf-input,
.cf-textarea {
  width: 100%;
  font-family: var(--cf-font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--cf-dark);
  background: var(--cf-input-bg);
  border: none;
  border-radius: var(--cf-radius-md);
  padding: 14px 16px;
  box-shadow: inset 0 0 8px 0 #dedede;
  outline: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  transform: scale(1);
}

.cf-input {
  height: 48px;
}

.cf-textarea {
  min-height: 159px;
  resize: vertical;
  line-height: 1.5;
}

.cf-input::placeholder,
.cf-textarea::placeholder {
  color: var(--cf-placeholder);
  font-weight: 600;
}

.cf-input:hover,
.cf-textarea:hover {
  transform: scale(1.015);
  box-shadow: inset 0 0 8px 0 #d5d5d5;
}

.cf-input:focus,
.cf-textarea:focus {
  transform: scale(1);
  box-shadow: inset 0 0 0 2px var(--cf-dark);
}

/* ---------- Services (checkbox chips) ---------- */

.cf-services-field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cf-services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cf-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 13px;
  border-radius: var(--cf-radius-md);
  background: var(--cf-chip-bg);
  cursor: pointer;
  user-select: none;
  transform: scale(1);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cf-chip:hover {
  transform: scale(1.05);
}

.cf-chip:active {
  transform: scale(0.96);
}

.cf-chip span {
  font-family: var(--cf-font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--cf-placeholder);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.cf-checkbox {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cf-checkbox:checked + span {
  color: #ffffff;
}

.cf-chip.is-selected,
.cf-chip:has(.cf-checkbox:checked) {
  background: var(--cf-dark);
}

.cf-checkbox:focus-visible + span {
  outline: 2px solid var(--cf-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Budget slider ---------- */

.cf-budget-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.cf-budget-label {
  text-align: center;
}

.cf-slider-wrap {
  position: relative;
  width: 100%;
  max-width: 492px;
  height: 96px; /* 40px reserved for the value bubble + 56px for the track/thumb */
}

.cf-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 23px;
  height: 10px;
  border-radius: 12px;
  background: var(--cf-input-bg);
  box-shadow: inset 0 0 8px 0 #dedede;
  overflow: hidden;
}

.cf-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 11.5px;
  background: var(--cf-dark);
  width: 18%;
}

.cf-range {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  z-index: 2;
  width: 100%;
  height: 26px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.cf-range::-webkit-slider-runnable-track {
  background: transparent;
  height: 26px;
}
.cf-range::-moz-range-track {
  background: transparent;
  height: 26px;
}

.cf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cf-dark) 0 42%, #ffffff 42% 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.cf-range::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cf-dark) 0 42%, #ffffff 42% 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.cf-range:hover::-webkit-slider-thumb,
.cf-range:active::-webkit-slider-thumb {
  transform: scale(1.08);
}
.cf-range:hover::-moz-range-thumb,
.cf-range:active::-moz-range-thumb {
  transform: scale(1.08);
}

.cf-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 3px var(--cf-dark);
}

.cf-value-bubble {
  position: absolute;
  top: 0;
  left: 18%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  font-family: var(--cf-font-display);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--cf-dark);
  white-space: nowrap;
  pointer-events: none;
}

.cf-bubble-pointer {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--cf-dark);
}

/* ---------- Submit button ---------- */

.cf-submit {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 6px 0 24px;
  border: none;
  border-radius: 25.5px;
  background: var(--cf-button-bg);
  color: var(--cf-button-text);
  font-family: var(--cf-font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transform: scale(1);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cf-submit:hover {
  opacity: 0.92;
  transform: scale(1.05);
}

.cf-submit:active {
  transform: scale(0.97);
}

.cf-submit:focus-visible {
  outline: 2px solid var(--cf-dark);
  outline-offset: 3px;
}

.cf-submit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 860px) {
  .cf-card {
    padding: 40px 32px;
  }

  .cf-heading {
    font-size: 36px;
  }
}

@media (max-width: 700px) {
  .cf-fields-row {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .cf-overlay {
    padding: 12px;
  }

  .cf-card {
    padding: 32px 20px;
    border-radius: 18px;
    gap: 20px;
  }

  .cf-heading {
    font-size: 28px;
  }

  .cf-subheading {
    font-size: 16px;
  }

  
}

@media (prefers-reduced-motion: reduce) {
  .cf-overlay,
  .cf-card,
  .cf-input,
  .cf-textarea,
  .cf-chip,
  .cf-submit,
  .cf-close,
  .cf-range::-webkit-slider-thumb,
  .cf-range::-moz-range-thumb {
    transition: none !important;
  }
}
