/*
 * Chicane Studio — modern polish overlay.
 *
 * Loads AFTER every Divi/Elegant Themes stylesheet so it can refine
 * specific things without touching the dumped CSS. Intentionally small
 * and surgical.
 *
 * IMPORTANT: never add a CSS `transition` to a property Divi's runtime
 * mutates on scroll. Divi's parallax JS writes `transform` to
 * `.et_parallax_bg` on every wheel tick — adding `transition: transform`
 * there causes each tick to animate over the transition duration,
 * stacking animations and freezing scroll. Lesson learned.
 */

/* ─── Reduced-motion respect ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Buttons — polished hover (orange arrow slides) ────────────────── */
/* Safe: Divi doesn't animate background-position on these. */
.et_pb_button,
.et_pb_promo_button {
  transition: background-position 280ms cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}
.et_pb_button:hover,
.et_pb_promo_button:hover {
  background-position: calc(100% + 4px) center !important;
}

/* ─── Image treatment — soft rounding + lift on hover ───────────────── */
/* Safe: Divi doesn't animate transform/box-shadow on <img> elements. */
.et_pb_image img,
.et_pb_gallery_image img,
.et_pb_main_blurb_image img {
  border-radius: 4px;
  transition: box-shadow 320ms ease;
}
.et_pb_image:hover img,
.et_pb_gallery_image:hover img {
  box-shadow: 0 12px 32px rgba(20, 20, 30, 0.12);
}

/* ─── Hero — subtle text-shadow for depth ───────────────────────────── */
.et_pb_fullwidth_header h1.et_pb_module_header,
.et_pb_fullwidth_header .et_pb_fullwidth_header_subhead {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ─── Type polish (Poppins) ─────────────────────────────────────────── */
body, input, textarea, select {
  font-feature-settings: "ss01", "cv11", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.et_pb_cta h2.et_pb_module_header,
h2.et_pb_promo_title,
.et_pb_text h3 {
  letter-spacing: -0.02em;
}

/* ─── Section dividers — replace Divi's grey rule with a navy accent ─ */
.et_pb_divider .et_pb_divider_internal {
  border-top-color: #1F2D6B !important;
  border-top-width: 1px !important;
  width: 80px !important;
  margin: 0 auto !important;
  position: relative;
}
.et_pb_divider .et_pb_divider_internal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1F2D6B;
  transform: translateX(-50%);
}

/* ─── Form inputs — modern focus state ──────────────────────────────── */
.et_pb_contact_form input[type="text"],
.et_pb_contact_form input[type="email"],
.et_pb_contact_form textarea {
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease !important;
}
.et_pb_contact_form input[type="text"]:focus,
.et_pb_contact_form input[type="email"]:focus,
.et_pb_contact_form textarea:focus {
  outline: none !important;
  border-color: #1F2D6B !important;
  box-shadow: 0 0 0 3px rgba(31, 45, 107, 0.12) !important;
  background: #fff !important;
}

/* ─── Footer Chicane Studio credit — accent on hover ────────────────── */
footer a[href*="chicane.studio"] {
  transition: color 220ms ease;
}
footer a[href*="chicane.studio"]:hover {
  color: #C9821E !important;
  text-decoration-color: #C9821E !important;
}

/* ─── Selection ─────────────────────────────────────────────────────── */
::selection {
  background: rgba(31, 45, 107, 0.95);
  color: #f4f4f4;
}
