/*
 * Item 9: WCAG AA colour contrast. The brand cyan (#09CAFF) is 1.9:1 on white and Divi's
 * default link blue (#2EA3F2) is 2.4-2.8:1, both below the 4.5:1 minimum. We swap them for
 * darker shades site-wide. Divi hardcodes most module colours as hex, so besides the global
 * colour variables each rule is overridden explicitly with !important.
 */

:root {
	--curcio-a11y-cyan: #0077a8;
	--curcio-a11y-link: #0a6eb4;
	--gcid-primary-color: var(--curcio-a11y-cyan);
	--gcid-heading-color: var(--curcio-a11y-cyan);
	--gcid-link-color: var(--curcio-a11y-link);
	--gcid-secondary-color: var(--curcio-a11y-link);
}

/* Body: links, headings, buttons */
html body a,
html body .et_pb_bg_layout_light.et_pb_module.et_pb_button,
html body .et_pb_bg_layout_light .et_pb_more_button,
html body .nav-single a,
html body .posted_in a,
html body .tagged_as a {
	color: var(--curcio-a11y-link) !important;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body .footer-widget h4,
html body .et_pb_blog_0 .et_pb_post .post-meta,
html body .et_pb_blog_0 .et_pb_post .post-meta a,
html body .et_pb_blog_0 .et_pb_post div.post-content a.more-link,
html body .et_pb_text_22 .et_pb_text_inner {
	color: var(--curcio-a11y-cyan) !important;
}

/* Cyan backgrounds that carry white text */
html body #page-container .et_pb_section .et_pb_button_1_tb_header,
html body #page-container .et_pb_section .et_pb_button_2_tb_header,
html body #page-container .et_pb_section .et_pb_button_3_tb_header,
html body #page-container .et_pb_section .et_pb_button_8,
html body .et_fixed_nav #page-container .et-fixed-header#top-header,
html body .et_pb_section_0_tb_header,
html body .et_pb_post_slider.et_pb_bg_layout_dark,
html body .et_pb_counter_amount,
html body #rum_sst_tab {
	background-color: var(--curcio-a11y-cyan) !important;
}

html body #page-container .et_pb_section .et_pb_button_8 {
	border-color: var(--curcio-a11y-cyan) !important;
	color: #ffffff !important;
}

/* Header: phone number, menu links */
html body .et_pb_blurb_0_tb_header .et_pb_blurb_description,
html body .et_pb_blurb_1_tb_header .et_pb_blurb_description,
html body .et_pb_menu_0_tb_header.et_pb_menu ul li.current-menu-item > a,
html body .et_pb_menu_1_tb_header.et_pb_menu ul li.current-menu-item > a {
	color: var(--curcio-a11y-cyan) !important;
}

/* Footer links sit on #efefef */
html body .et-l--footer a {
	color: var(--curcio-a11y-link) !important;
}

/* Elements on a cyan background keep white text (the link rule above must not recolour them) */
html body .et-l--header > .et_builder_inner_content .et_pb_section.et_pb_section_0_tb_header,
html body #page-container .et_pb_section.et_pb_section_0_tb_header {
	background-color: var(--curcio-a11y-cyan) !important;
}

html body .et_pb_section_0_tb_header a,
html body .et_pb_section_0_tb_header a.et_pb_button.et_pb_module.et_pb_bg_layout_light,
html body #rum_sst_tab,
html body a#rum_sst_tab {
	color: #ffffff !important;
}

/*
 * Theme Builder body templates hardcode cyan on each module's headings with higher
 * specificity than the global rule. Scoped to light-layout modules so headings that are
 * deliberately light on a dark background are left alone.
 */
html body .et_pb_module.et_pb_bg_layout_light .et_pb_title_container h1.entry-title,
html body .et_pb_module.et_pb_bg_layout_light .et_pb_title_container h2.entry-title,
html body .et_pb_module.et_pb_bg_layout_light .et_pb_text_inner h1,
html body .et_pb_module.et_pb_bg_layout_light .et_pb_text_inner h2,
html body .et_pb_module.et_pb_bg_layout_light .et_pb_text_inner h3,
html body .et_pb_module.et_pb_bg_layout_light .et_pb_text_inner h4 {
	color: var(--curcio-a11y-cyan) !important;
}

/*
 * Homepage hero: white slide titles sit on a photo. Before the slide image paints, the
 * section behind them is plain white, which fails contrast when measured. Give the section
 * and slider the same dark cyan the slides already fall back to (the slides cover it).
 */
html body.home .et_pb_section_0.et_pb_fullwidth_section,
html body.home .et_pb_section_0 .et_pb_slider,
html body.home .et_pb_section_0 .et_pb_slides {
	background-color: var(--curcio-a11y-cyan) !important;
}
