/* Contact CTA readability fixes. Scoped to the CTA/form only. */
/* Keep the CTA photo at its native brightness in both themes. The overlay is
   retained as a structural layer but must never darken or intercept content. */
.cta .media-overlay,
html[data-theme="light"] .cta .media-overlay {
  z-index: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}

.cta.media-section,
html[data-theme="light"] .cta.media-section {
  background-image:
    var(--site-decor),
    url("/assets/cta-consultation-background.webp") !important;
  background-position: center, center !important;
  background-repeat: repeat, no-repeat !important;
  background-size: var(--site-decor-size), cover !important;
}

html:not([data-theme="light"]) .cta {
  border-bottom-color: rgba(177, 138, 92, 0.34) !important;
}

/* Dark theme: neutralize the cool cast of the application section and tie it
   into the deep-bronze navigation/footer system. */
html:not([data-theme="light"]) .cta.media-section {
  background-color: #160e09 !important;
}

html:not([data-theme="light"]) .cta.media-section .media-overlay {
  z-index: 0 !important;
  background:
    linear-gradient(90deg, rgba(17, 10, 6, 0.9) 0%, rgba(42, 25, 14, 0.78) 48%, rgba(18, 10, 6, 0.86) 100%),
    linear-gradient(135deg, rgba(126, 76, 37, 0.28), rgba(22, 13, 8, 0.54)) !important;
  box-shadow:
    inset 0 1px 0 rgba(208, 154, 98, 0.18),
    inset 0 -1px 0 rgba(208, 154, 98, 0.2) !important;
}

html:not([data-theme="light"]) .cta.media-section .cta-contact-item {
  border-color: rgba(208, 154, 98, 0.32) !important;
  background: rgba(27, 17, 10, 0.86) !important;
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) {
  --contact-form-ink: #f1eee8;
  --contact-form-field-ink: #171d23;
  --contact-form-muted: rgba(231, 225, 216, 0.78);
  --contact-form-soft: rgba(231, 225, 216, 0.68);
  --contact-form-border: rgba(177, 138, 92, 0.42);
  --contact-form-field: rgba(247, 244, 237, 0.94);
  border-color: var(--contact-form-border) !important;
  background:
    linear-gradient(145deg, rgba(177, 138, 92, 0.11), transparent 42%),
    rgba(13, 14, 14, 0.94) !important;
  color: var(--contact-form-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 70px rgba(0, 0, 0, 0.42) !important;
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-field input,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-field textarea {
  color: var(--contact-form-field-ink) !important;
  caret-color: var(--contact-form-field-ink) !important;
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-field input::placeholder,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-field textarea::placeholder {
  color: rgba(23, 29, 35, 0.68) !important;
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-field span,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-brief-summary > span:first-child,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-segment-group legend {
  color: rgba(241, 238, 232, 0.86) !important;
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-hint,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-status,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-trust-list,
html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-brief-summary small {
  color: var(--contact-form-muted) !important;
}

html:not([data-theme="light"]) .cta .contact-form:not(.contact-form-compact) .form-trust-list {
  border-top-color: rgba(177, 138, 92, 0.26) !important;
}

html[data-theme="light"] .cta {
  border-bottom-color: rgba(126, 116, 103, 0.28) !important;
}
