/*
Theme Name: YourResidence
Description: YourResidence child theme for GeneratePress.
Author: YourResidence
Template: generatepress
Version: 0.1.0
Text Domain: yourresidence
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Brand palette. Use semantic tokens below for components.
 * Mint is a fill/accent on dark surfaces, never body text on ivory.
 */
:root {
	--yr-container-width: 1344px;
	--yr-container-gutter: 32px;
	--yr-forest: #003d32;
	--yr-forest-hover: #00533f;
	--yr-mint: #20e3b2;
	--yr-mint-hover: #00cc9c;
	--yr-amber: #ffb000;
	--yr-amber-hover: #ed9f00;
	--yr-amber-wash: #fff2cf;
	--yr-ivory: #f6fffb;
	--yr-white: #ffffff;
	--yr-sage: #d6f4e8;
	--yr-ink: #102a23;
	--yr-muted: #3f5d52;
	--yr-line: #a9cdbd;
	--yr-teal: #006c53;
	--yr-teal-hover: #004d3c;
	--yr-mint-soft: #bbf3dc;
	--yr-mint-wash: #e6fff3;
	--yr-mint-border: #8ad5b7;
	--yr-inverse-muted: #dffff1;
	--yr-gradient-header: var(--yr-gradient-footer);
	--yr-gradient-footer: linear-gradient(135deg, #002e26 0%, var(--yr-forest) 52%, var(--yr-forest-hover) 100%);
	--yr-gradient-forest: linear-gradient(115deg, var(--yr-forest) 0%, var(--yr-forest-hover) 52%, #007052 100%);
	--yr-gradient-mint: linear-gradient(115deg, var(--yr-mint) 0%, #55efb8 100%);

	--yr-color-background: var(--yr-ivory);
	--yr-color-surface: var(--yr-white);
	--yr-color-surface-soft: var(--yr-sage);
	--yr-color-text: var(--yr-ink);
	--yr-color-text-muted: var(--yr-muted);
	--yr-color-border: var(--yr-line);
	--yr-color-link: var(--yr-teal);
	--yr-color-link-hover: var(--yr-teal-hover);
	--yr-color-inverse-background: var(--yr-forest);
	--yr-color-inverse-text: var(--yr-ivory);
	--yr-color-button-background: var(--yr-mint);
	--yr-color-button-hover: var(--yr-mint-hover);
	--yr-color-button-text: var(--yr-forest);
	--yr-color-focus: var(--yr-teal);

	/* GeneratePress global colour aliases. */
	--contrast: var(--yr-ink);
	--contrast-2: var(--yr-muted);
	--contrast-3: var(--yr-muted);
	--base: var(--yr-line);
	--base-2: var(--yr-ivory);
	--base-3: var(--yr-white);
	--accent: var(--yr-teal);
}

@media (max-width: 1100px) {
	:root { --yr-container-gutter: 24px; }
}

@media (max-width: 480px) {
	:root { --yr-container-gutter: 16px; }
}

body,
.editor-styles-wrapper {
	background-color: var(--yr-color-background);
	color: var(--yr-color-text);
}

a {
	color: var(--yr-color-link);
}

a:hover,
a:focus {
	color: var(--yr-color-link-hover);
}

h1, h2, h3, h4, h5, h6 {
	color: inherit;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.sidebar .widget {
	background-color: var(--yr-color-surface);
	color: var(--yr-color-text);
}

.site-header,
.main-navigation,
.main-navigation ul ul,
.site-info,
.footer-widgets {
	background-color: var(--yr-color-inverse-background);
	color: var(--yr-color-inverse-text);
	--yr-color-focus: var(--yr-mint);
}

.site-header a,
.site-header a:visited,
.main-title a,
.main-title a:hover,
.site-description,
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items,
.site-info a,
.footer-widgets a {
	color: var(--yr-color-inverse-text);
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus-within > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	background-color: var(--yr-forest-hover);
	color: var(--yr-mint);
}

.site-info a:hover,
.footer-widgets a:hover {
	color: var(--yr-mint);
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
a.button,
.wp-block-button__link:not(.has-background),
.main-navigation .main-nav ul li.menu-item-demo > a {
	background-color: var(--yr-color-button-background);
	color: var(--yr-color-button-text);
}

button:hover,
button:focus,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
a.button:hover,
.wp-block-button__link:not(.has-background):hover,
.main-navigation .main-nav ul li.menu-item-demo > a:hover {
	background-color: var(--yr-color-button-hover);
	color: var(--yr-color-button-text);
}

/* Preserve the GeneratePress mobile menu's dark surface. */
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus {
	background-color: var(--yr-forest-hover);
	color: var(--yr-ivory);
}

.entry-meta,
.entry-meta a,
.entry-summary,
.wp-block-post-date,
.wp-block-image figcaption {
	color: var(--yr-color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	background-color: var(--yr-color-surface);
	color: var(--yr-color-text);
	border-color: var(--yr-muted);
}

input::placeholder,
textarea::placeholder {
	color: var(--yr-color-text-muted);
	opacity: 1;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--yr-color-focus);
	outline-offset: 3px;
}

blockquote,
.wp-block-table td,
.wp-block-table th,
hr {
	border-color: var(--yr-color-border);
}

::selection {
	background-color: var(--yr-mint);
	color: var(--yr-forest);
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* Directional arrow motion keeps the button itself stable. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
	:is(.yr-header .menu-item-demo > a, .yr-footer__actions a, .yr-home .wp-block-button__link) {
		position: relative;
		overflow: hidden;
		transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
	}
	:is(.yr-header .menu-item-demo > a, .yr-footer__actions a, .yr-home .wp-block-button__link)::before {
		content: none;
	}
	:is(.yr-header .menu-item-demo > a, .yr-footer__actions a, .yr-home .wp-block-button__link)::after {
		transition: transform 200ms ease;
	}
	:is(.yr-header .menu-item-demo > a, .yr-footer__actions a, .yr-home .wp-block-button__link):is(:hover, :focus-visible)::after {
		transform: translate(3px, -3px);
	}
}

/* Native scrollbars: standard Firefox styling plus rounded Chromium/Safari
 * controls. High-contrast mode retains the operating system's own colours.
 */
@media (forced-colors: none) {
	html {
		scrollbar-color: var(--yr-amber) var(--yr-ivory);
		scrollbar-width: thin;
	}

	@supports selector(::-webkit-scrollbar) {
		html { scrollbar-color: auto; scrollbar-width: auto; }

		::-webkit-scrollbar { width: 8px; height: 8px; }
		::-webkit-scrollbar-track { background: var(--yr-ivory); }
		::-webkit-scrollbar-thumb {
			min-height: 48px;
			min-width: 48px;
			border: 2px solid transparent;
			border-radius: 999px;
			background-color: var(--yr-amber);
			background-clip: padding-box;
		}
		::-webkit-scrollbar-thumb:hover { background-color: var(--yr-amber-hover); }
		::-webkit-scrollbar-thumb:active { background-color: var(--yr-amber-hover); }
		::-webkit-scrollbar-button { display: none; }
		::-webkit-scrollbar-corner { background: var(--yr-ivory); }
	}
}
