/*
 * Canonical factories RFQ module, re-used outside /factories/.
 *
 * Keep the @import versions in sync with
 * static/assets/css/pages/factories-list.css.
 *
 * IMPORTANT: this file must be linked BEFORE revamp-v2.css / revamp-v3.css.
 * .factories-button and .btn have the same specificity; if this file loads
 * after revamp-v2/v3 the submit button becomes the 52px pill instead of the
 * 48px reference button.
 */
@import url("./factories-showcase/01-hero.css?v=1");
@import url("./factories-showcase/03-capability.css?v=3");
@import url("./factories-showcase/04-motion-responsive.css?v=4");
@import url("./factories-showcase/06-cinematic-a.css?v=2");
@import url("./factories-showcase/06-cinematic-c.css?v=2");

/*
 * Final GSAP state, and the no-JS fallback: on /factories/ the 1.05s tween
 * ends at inset(0% ... round 28px). Without GSAP the base border-radius is
 * 43.2px, so this keeps the embed visually identical at rest.
 */
.factories-page.factories-rfq-embed .factories-rfq__form {
  clip-path: inset(0 0 0 0 round 28px);
}

/*
 * Progressive enhancement: only hide reveal items when the embed script is
 * alive. If the script fails to load, the section stays visible even though
 * <html class="js"> is set by main.js.
 */
.factories-page.factories-rfq-embed:not(.rfq-js) [data-factory-reveal] {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/*
 * Paper surface: the global cyan focus ring is only 1.27:1 here; use the
 * brand blue already used by /factories/ (4.25:1).
 */
.factories-page.factories-rfq-embed .factories-rfq :is(a, button, input, select, textarea):focus-visible {
  outline-color: var(--fx-blue);
}

/*
 * Server-side RFQ validation summary. The canonical module is now also mounted
 * on /contact/, where it is the only form; make Django's errors visible here.
 */
.factories-rfq__errors {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid rgba(203, 68, 68, .35);
  border-radius: 12px;
  background: rgba(203, 68, 68, .06);
  color: #7a1f1f;
  font-size: 12px;
  line-height: 1.65;
}
.factories-rfq__errors strong { display: block; margin-bottom: 6px; }
.factories-rfq__errors ul { margin: 0; padding-inline-start: 18px; }
.factories-rfq__errors li + li { margin-top: 3px; }
