/*
 * Dr. Marissa brand foundation. Font files are registered by the main stylesheet.
 * Deliberately leaves Divi geometry, galleries, comparison modules, and button
 * treatment intact. No universal descendant or pseudo-element font overrides:
 * Divi's icon font must remain available to toggles, menus, and social links.
 */
body.mg-brand-refresh {
  --mg-brand-ivory: #FFFDFA;
  --mg-brand-brown: #2F251F;
  --mg-brand-gold: #B08047;
  --mg-brand-beige: #C2B19C;
  --mg-brand-font-body: "MG Karla", Karla, Arial, sans-serif;
  --mg-brand-font-heading: "MG Cormorant Garamond", "Cormorant Garamond", Georgia, serif;
  --mg-brand-font-script: "MG Absolute Beauty", "Absolute Beauty", cursive;
  background-color: var(--mg-brand-ivory);
  color: var(--mg-brand-brown);
  font-family: var(--mg-brand-font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.mg-brand-refresh #page-container,
body.mg-brand-refresh #main-content {
  background-color: var(--mg-brand-ivory);
}

/* Replace module-level body fonts without changing their containers. */
body.mg-brand-refresh .et_pb_text:not(.mg-native-header-text),
body.mg-brand-refresh .et_pb_blurb_description,
body.mg-brand-refresh .et_pb_toggle_content,
body.mg-brand-refresh .et_pb_tab,
body.mg-brand-refresh .et_pb_testimonial_description,
body.mg-brand-refresh .entry-content,
body.mg-brand-refresh .wpforms-container,
body.mg-brand-refresh .dsm_faq_content,
body.mg-brand-refresh .dsm-faq-content {
  font-family: var(--mg-brand-font-body) !important;
  font-weight: 400;
  line-height: 1.65 !important;
}

body.mg-brand-refresh #main-content .et_pb_text p,
body.mg-brand-refresh #main-content .et_pb_text li,
body.mg-brand-refresh #main-content .et_pb_blurb_description p,
body.mg-brand-refresh #main-content .et_pb_toggle_content,
body.mg-brand-refresh #main-content .et_pb_toggle_content p,
body.mg-brand-refresh #main-content .et_pb_toggle_content li,
body.mg-brand-refresh #main-content .et_pb_tab p,
body.mg-brand-refresh #main-content .et_pb_tab li,
body.mg-brand-refresh #main-content .et_pb_testimonial_description p {
  font-family: var(--mg-brand-font-body) !important;
  font-size: 18px !important;
  font-weight: 400;
  line-height: 1.65 !important;
  letter-spacing: normal !important;
}

/* Keep intentionally painted sections legible in their authored foreground.
 * The default white Divi sections take the new warm surface and dark ink. */
body.mg-brand-refresh #main-content .et_pb_section:not(.et_pb_with_background):not(.et_pb_section_video):not(.et_pb_section_parallax) {
  background-color: var(--mg-brand-ivory);
}

body.mg-brand-refresh #main-content .et_pb_section:not(.et_pb_with_background):not(.et_pb_section_video):not(.et_pb_section_parallax) .et_pb_text,
body.mg-brand-refresh #main-content .et_pb_section:not(.et_pb_with_background):not(.et_pb_section_video):not(.et_pb_section_parallax) .et_pb_blurb_description {
  color: var(--mg-brand-brown);
}

body.mg-brand-refresh #main-content .et_pb_section:not(.et_pb_with_background):not(.et_pb_section_video):not(.et_pb_section_parallax) :is(h1, h2, h3, h4, h5) {
  color: var(--mg-brand-brown) !important;
}

/* Heading sizes and responsive sizing remain with the authored modules. */
body.mg-brand-refresh h1,
body.mg-brand-refresh h2,
body.mg-brand-refresh h3,
body.mg-brand-refresh h4 {
  font-family: var(--mg-brand-font-heading) !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
}

/* Small editorial eyebrows; FAQ controls retain their existing font size. */
body.mg-brand-refresh h5:not(.et_pb_toggle_title):not(.dsm_faq_title):not(.dsm-faq-title),
body.mg-brand-refresh .mg-eyebrow {
  font-family: var(--mg-brand-font-body) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase;
}

body.mg-brand-refresh .et_pb_toggle_title,
body.mg-brand-refresh .dsm_faq_title,
body.mg-brand-refresh .dsm-faq-title,
body.mg-brand-refresh .et_pb_tabs_controls li a {
  font-family: var(--mg-brand-font-body) !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
}

/* Captions and metadata remain smaller than body copy. */
body.mg-brand-refresh .wp-caption-text,
body.mg-brand-refresh .et_pb_gallery_caption,
body.mg-brand-refresh .et_pb_gallery_title,
body.mg-brand-refresh .post-meta,
body.mg-brand-refresh .post-meta a,
body.mg-brand-refresh figcaption {
  font-family: var(--mg-brand-font-body) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}

/* Header, overlay navigation, form controls, and buttons use the same UI face.
 * Button size, border, fill, padding, and hover style are intentionally untouched. */
body.mg-brand-refresh #main-header nav a,
body.mg-brand-refresh #top-menu a,
body.mg-brand-refresh .et_mobile_menu a,
body.mg-brand-refresh .et-l--header .et_pb_menu a,
body.mg-brand-refresh .et-l--footer .et_pb_menu a,
body.mg-brand-refresh .et-l--footer .et_pb_text,
body.mg-brand-refresh .et-l--footer .et_pb_text p,
body.mg-brand-refresh input,
body.mg-brand-refresh select,
body.mg-brand-refresh textarea,
body.mg-brand-refresh label,
body.mg-brand-refresh button,
body.mg-brand-refresh .et_pb_button:not(.mg-native-menu-button),
body.mg-brand-refresh .wp-element-button,
body.mg-brand-refresh .wp-block-button__link,
body.mg-brand-refresh .wpforms-submit {
  font-family: var(--mg-brand-font-body) !important;
}

body.mg-brand-refresh button,
body.mg-brand-refresh .et_pb_button:not(.mg-native-menu-button),
body.mg-brand-refresh .wp-element-button,
body.mg-brand-refresh .wp-block-button__link,
body.mg-brand-refresh .wpforms-submit {
  font-weight: 500 !important;
}

/* Only the two known signatures, plus explicitly marked script accents. */
body.mg-brand-refresh.page-id-13 .et_pb_text_1 h6,
body.mg-brand-refresh.page-id-62 .et_pb_text_1 h6,
body.mg-brand-refresh .mg-signature {
  font-family: var(--mg-brand-font-script) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* The custom journal owns its typography tokens and compact metadata sizes. */
body.mg-brand-refresh #mg-journal {
  --mg-font-body: var(--mg-brand-font-body);
  --mg-font-display: var(--mg-brand-font-heading);
  color: var(--mg-brand-brown);
  font-family: var(--mg-brand-font-body);
}

body.mg-brand-refresh #mg-journal .mg-journal-hero__content h2,
body.mg-brand-refresh #mg-journal .mg-journal-card__copy h3 {
  font-family: var(--mg-brand-font-heading) !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
}

body.mg-brand-refresh #mg-journal .mg-journal-heading h1,
body.mg-brand-refresh #mg-journal .mg-journal-heading .mg-blog-title,
body.mg-brand-refresh #mg-journal .mg-journal-divider h2 {
  font-family: var(--mg-brand-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
}

body.mg-brand-refresh #mg-journal .mg-journal-topic,
body.mg-brand-refresh #mg-journal .mg-journal-read,
body.mg-brand-refresh #mg-journal .mg-journal-pagination a,
body.mg-brand-refresh #mg-journal .mg-journal-controls,
body.mg-brand-refresh #mg-journal .mg-journal-rail-controls {
  font-family: var(--mg-brand-font-body) !important;
}

/* Paired surface utilities for sections deliberately recoloured in page CSS. */
body.mg-brand-refresh .mg-surface-ivory {
  background-color: var(--mg-brand-ivory) !important;
  color: var(--mg-brand-brown) !important;
}

body.mg-brand-refresh .mg-surface-ivory h1,
body.mg-brand-refresh .mg-surface-ivory h2,
body.mg-brand-refresh .mg-surface-ivory h3,
body.mg-brand-refresh .mg-surface-ivory h4,
body.mg-brand-refresh .mg-surface-ivory h5,
body.mg-brand-refresh .mg-surface-ivory .et_pb_text,
body.mg-brand-refresh .mg-surface-ivory .et_pb_blurb_description {
  color: var(--mg-brand-brown) !important;
}

body.mg-brand-refresh .mg-surface-brown {
  background-color: var(--mg-brand-brown) !important;
  color: var(--mg-brand-ivory) !important;
}

body.mg-brand-refresh .mg-surface-brown h1,
body.mg-brand-refresh .mg-surface-brown h2,
body.mg-brand-refresh .mg-surface-brown h3,
body.mg-brand-refresh .mg-surface-brown h4,
body.mg-brand-refresh .mg-surface-brown h5,
body.mg-brand-refresh .mg-surface-brown .et_pb_text,
body.mg-brand-refresh .mg-surface-brown .et_pb_blurb_description {
  color: var(--mg-brand-ivory) !important;
}
