/**
 * MLR Site Fixes — accessibility stylesheet.
 *
 * Text colour only. Nothing here changes layout, spacing, size or weight, and
 * the champagne gold is left untouched wherever it is used as a border, rule,
 * ornament or background — those are decorative and exempt from text-contrast
 * rules. Only gold used *as text* is darkened, because at #C19B76 on white it
 * measures 2.56:1, which fails even the 3:1 large-text threshold.
 *
 * Measured against the live homepage, 2026-08-08. Ratios are WCAG 2.1 AA.
 */

:root {
	/* Darkened champagne for small text. 4.98:1 on #FFF, 4.69:1 on #F8F8F8. */
	--mlr-gold-text: #8a6a42;
	/* Body grey that clears AA on the section tints. 5.02:1 on #F8F8F8. */
	--mlr-body-text: #6b6b6b;
	/* Foreground for text sitting on a champagne fill. 6.68:1 on #C19B76. */
	--mlr-on-gold: #241a10;
}

/* -------------------------------------------------------------------------
 * 1. Gold text on light backgrounds  (was 2.41–2.60:1, needs 4.5:1)
 * ---------------------------------------------------------------------- */

/*
 * Section eyebrows — "WELCOME TO MORITZ LUXE RESIDENCES", "EXPLORE",
 * "THE PLEASURE OF LUXURY", "WHY CHOOSE MORITZ LUXE RESIDENCES?".
 *
 * These measure 2.41:1 and appear all down the page, so they are the most
 * repeated contrast failure on the site. The theme sets the colour with
 * `.milenia-body--scheme-lightbrown .milenia-section-subtitle` (specificity
 * 0,2,0), so the override has to match that weight to win — a bare
 * `.milenia-section-subtitle` would lose. The second selector is the fallback
 * for the theme's other colour schemes.
 *
 * The plugin also re-tags these from <h6> to <div> to fix heading order. That
 * is safe for colour: the rule above is class-based, not tag-based, so the
 * gold survives the change.
 */
.milenia-body--scheme-lightbrown .milenia-section-subtitle,
.milenia-section-subtitle,
/* Active item in the vertical navigation drawer. */
.milenia-navigation-vertical .current-menu-item > a,
.milenia-navigation-vertical .current_page_item > a,
.milenia-navigation-vertical .current-menu-ancestor > a,
/* Villa card category links — "MLR Collection". */
.milenia-entity-categories a,
.milenia-entity-categories span > a,
/* Portfolio filter, active state — "All". */
.milenia-filter a.milenia-active,
.milenia-filter .milenia-active > a,
/* Text-style primary buttons — "Explore More". */
a.milenia-btn--link.milenia-btn--scheme-primary,
.milenia-entity-footer a.milenia-btn--link,
/* MailPoet signup form links — "privacy policy". */
.mailpoet_form_paragraph a,
.mailpoet_form a {
	color: var(--mlr-gold-text);
}

/* Hover/focus must stay distinguishable and must not fall back under AA. */
.milenia-navigation-vertical .current-menu-item > a:hover,
.milenia-entity-categories a:hover,
.milenia-entity-categories a:focus,
.milenia-filter a.milenia-active:hover,
a.milenia-btn--link.milenia-btn--scheme-primary:hover,
a.milenia-btn--link.milenia-btn--scheme-primary:focus,
.milenia-entity-footer a.milenia-btn--link:hover,
.mailpoet_form_paragraph a:hover,
.mailpoet_form_paragraph a:focus {
	color: #6f5333;
}

/* -------------------------------------------------------------------------
 * 2. Body copy on the tinted section background  (was 3.47:1)
 * ---------------------------------------------------------------------- */

.milenia-pricing-table-content p,
.milenia-pricing-table-content li,
.milenia-offers .milenia-pricing-table-content {
	color: var(--mlr-body-text);
}

/* -------------------------------------------------------------------------
 * 3. Text sitting on a champagne fill  (was 2.16:1)
 *
 * Near-white on gold cannot be rescued by nudging the grey — the fill itself
 * is too light. Flipping the citation to a deep brown keeps the block looking
 * the same while clearing AA comfortably.
 * ---------------------------------------------------------------------- */

.milenia-author-info cite,
.milenia-author-info cite a,
.milenia-author-info cite a.milenia-ln--independent {
	color: var(--mlr-on-gold);
}

.milenia-author-info cite a:hover,
.milenia-author-info cite a:focus {
	color: #000;
}

/* -------------------------------------------------------------------------
 * 4. Support classes
 * ---------------------------------------------------------------------- */

/*
 * The H1 injected by the plugin. Present for screen readers and search
 * engines, invisible on screen — the visible page title lives in the slider
 * artwork, which cannot carry a heading.
 */
.mlr-fix-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/*
 * The theme's section eyebrows are re-tagged from <h6> to <div> by the plugin
 * to repair the heading order. <div> has no default margin, so the theme's own
 * h6 rules no longer apply — restore the two that mattered.
 */
div.milenia-section-subtitle,
p.vc_custom_heading {
	display: block;
	margin-top: 0;
}

/*
 * Keyboard focus is currently invisible in several places. A visible ring is
 * required for the "focus is never obscured / visible" manual checks and costs
 * nothing to mouse users, who never trigger :focus-visible.
 */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--mlr-gold-text);
	outline-offset: 2px;
}

/*
 * Lighthouse flagged 114 non-composited animations. This does not fix them,
 * but it does honour the OS "reduce motion" setting, which is the part that
 * actually affects users.
 */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
