/* Flare Homes — base styles & design tokens
   Phase 1 scope: variables + reset only. Full templates come in later phases. */

:root {
	--color-cream: #faf6ee;
	--color-charcoal: #2b2a27;
	--color-forest: #2f3e2f;
	--color-gold: #d0a247; /* lightened from #c8973a — that shade only hit 4.3:1 as footer heading text on the forest background, just under AA's 4.5:1 */
	--color-terracotta: #ad4c28; /* darkened from #c15f3c — that shade failed WCAG AA (3.9:1) as small text/links on the cream background; this passes at 5:1+ while staying a clear warm terracotta */
	--color-border: #e6ddc9;

	--font-heading: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 2rem;
	--space-lg: 4rem;
	--space-xl: 6rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background-color: var(--color-cream);
	color: var(--color-charcoal);
	font-family: var(--font-body);
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-forest);
	line-height: 1.2;
}

a {
	color: var(--color-terracotta);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------------------------------------------------------------------
   Shared layout & component utilities — used by every template
   (homepage.css / property.css add page-specific styles on top of these).
------------------------------------------------------------------------ */
.fh-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.fh-section-heading {
	text-align: center;
	font-size: 1.75rem;
	margin: 0 0 2.5rem;
}

.fh-section-intro {
	text-align: center;
	max-width: 640px;
	margin: -1.75rem auto 2.5rem;
	color: var(--color-charcoal);
	opacity: 0.8;
}

/* ---------------------------------------------------------------------
   Full-bleed image banner with an overlaid H1 — Browse Homes and the
   policy pages (Privacy Policy, Terms & Conditions, Refund Policy) share
   this via template-parts/hero-banner.php. Lives here (not archive.css)
   since it's no longer archive-only.
------------------------------------------------------------------------ */
.fh-hero-banner {
	position: relative;
	min-height: 32vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-forest);
	background-size: cover;
	background-position: center;
	margin-bottom: 2rem;
}
.fh-hero-banner__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 26, 20, 0.35) 0%, rgba(20, 26, 20, 0.55) 100%);
}
.fh-hero-banner__heading {
	position: relative;
	z-index: 1;
	color: #fff;
	text-align: center;
	margin: 0;
	font-size: 2rem;
}

@media (min-width: 768px) {
	.fh-hero-banner {
		min-height: 40vh;
	}
	.fh-hero-banner__heading {
		font-size: 2.75rem;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.fh-btn {
	display: inline-block;
	padding: 0.85rem 1.75rem;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	cursor: pointer;
}
.fh-btn:hover {
	transform: translateY(-2px);
}
.fh-btn--primary {
	background-color: var(--color-gold);
	color: var(--color-charcoal);
}
.fh-btn--primary:hover {
	background-color: #bd8f3a;
	color: var(--color-charcoal); /* was #fff at 3.4:1 against this background — fails AA */
}
.fh-btn--secondary {
	background-color: transparent;
	border-color: rgba(250, 246, 238, 0.8);
	color: #faf6ee;
}
.fh-btn--secondary:hover {
	background-color: rgba(250, 246, 238, 0.15);
}
.fh-btn--outline {
	background-color: transparent;
	border-color: var(--color-forest);
	color: var(--color-forest);
	width: 100%;
	text-align: center;
}
.fh-btn--outline:hover {
	background-color: var(--color-forest);
	color: #fff;
}

.fh-icon {
	display: inline-block;
	vertical-align: middle;
}

/* ---------------------------------------------------------------------
   Site header (every page)
------------------------------------------------------------------------ */
.site-header {
	background-color: var(--color-cream);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.fh-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
}
.site-branding {
	display: flex;
	align-items: center;
}
.custom-logo-link {
	display: block;
	line-height: 0;
}
.custom-logo {
	max-height: 52px;
	width: auto;
}
.site-title {
	font-family: var(--font-heading);
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--color-forest);
	text-decoration: none;
}

.fh-nav-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 34px;
	height: 34px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}
.fh-nav-toggle span {
	display: block;
	height: 2px;
	background-color: var(--color-forest);
	border-radius: 1px;
}

.main-navigation {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--color-cream);
	border-bottom: 1px solid var(--color-border);
}
.main-navigation.is-open {
	display: block;
}
.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.main-navigation a {
	color: var(--color-charcoal);
	text-decoration: none;
	font-weight: 500;
}
.main-navigation a:hover {
	color: var(--color-terracotta);
}

@media (min-width: 768px) {
	.fh-nav-toggle {
		display: none;
	}
	.main-navigation {
		display: block;
		position: static;
		background: none;
		border: none;
	}
	.main-navigation ul {
		flex-direction: row;
		padding: 0;
		gap: 2rem;
	}
}

/* ---------------------------------------------------------------------
   Site footer (every page)
------------------------------------------------------------------------ */
.site-footer {
	background-color: var(--color-forest);
	color: #e7e5da;
	margin-top: 2rem;
}
.fh-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	padding: 3.5rem 1.25rem 2.5rem;
}
.fh-footer__logo {
	display: block;
	font-family: var(--font-heading);
	font-size: 1.3rem;
	color: #fff;
	margin-bottom: 0.75rem;
}
.fh-footer__about p {
	font-size: 0.92rem;
	line-height: 1.7;
	color: #d8d5c8;
}
.fh-footer__social {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
}
.fh-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(231, 229, 218, 0.35);
	color: #e7e5da;
}
.fh-footer__social-link:hover {
	background-color: var(--color-gold);
	border-color: var(--color-gold);
	color: var(--color-charcoal);
}
.fh-footer__heading {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-gold);
	margin: 0 0 1.1rem;
}
.fh-footer__contact-list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.fh-footer__contact-list a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: #e7e5da;
	text-decoration: none;
	font-size: 0.92rem;
}
.fh-footer__contact-list a:hover {
	color: var(--color-gold);
}
.fh-footer__contact-list-address {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	color: #e7e5da;
	font-size: 0.92rem;
}
.fh-footer__contact-list-address .flarehomes-icon {
	flex: 0 0 20px;
	margin-top: 0.15rem;
}
.fh-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.fh-footer__links a {
	color: #e7e5da;
	text-decoration: none;
	font-size: 0.92rem;
}
.fh-footer__links a:hover {
	color: var(--color-gold);
}
.fh-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1rem;
}
.fh-newsletter-form input[type="email"] {
	padding: 0.7rem 0.9rem;
	border-radius: 4px;
	border: 1px solid rgba(231, 229, 218, 0.35);
	background-color: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 0.9rem;
}
.fh-newsletter-form input[type="email"]::placeholder {
	color: #b9b6a8;
}
.fh-newsletter-form__note {
	font-size: 0.82rem;
	color: var(--color-gold);
}
.fh-footer__bottom {
	border-top: 1px solid rgba(231, 229, 218, 0.15);
	padding: 1.25rem 0;
}
.fh-footer__bottom p {
	margin: 0;
	font-size: 0.8rem;
	color: #b9b6a8;
	text-align: center;
}

@media (min-width: 768px) {
	.fh-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.fh-footer__about {
		grid-column: span 2;
	}
}
@media (min-width: 1024px) {
	.fh-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
	}
	.fh-footer__about {
		grid-column: span 1;
	}
}

/* ---------------------------------------------------------------------
   Modal (every page — the general inquiry modal lives in footer.php)
------------------------------------------------------------------------ */
.fh-modal {
	position: fixed;
	inset: 0;
	z-index: 210;
	background-color: rgba(20, 20, 18, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}
.fh-modal[hidden] {
	display: none;
}
.fh-modal__dialog {
	position: relative;
	background-color: #fff;
	border-radius: 10px;
	padding: 2rem;
	max-width: 520px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
}
.fh-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background-color: #f4efe3;
	color: var(--color-charcoal);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fh-modal__dialog h2 {
	margin: 0 0 0.4rem;
	font-size: 1.3rem;
	padding-right: 2rem;
}
.fh-modal__subtitle {
	color: var(--color-terracotta);
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
}

/* ---------------------------------------------------------------------
   Inquiry form (every page — property modal + general footer modal)
------------------------------------------------------------------------ */
.fh-inquiry-form__feedback {
	padding: 0.75rem 1rem;
	border-radius: 6px;
	background-color: #f4efe3;
	color: var(--color-charcoal);
	font-size: 0.88rem;
	margin-bottom: 1rem;
}
.fh-inquiry-form__feedback--error {
	background-color: #fbe9e7;
	color: #9a3b2f;
}
.fh-inquiry-form__property-display {
	background-color: #f4efe3;
	border-radius: 6px;
	padding: 0.65rem 0.9rem;
	font-size: 0.9rem;
	margin: 0 0 1rem;
}
.fh-form-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 1rem;
}
.fh-form-field {
	margin-bottom: 1rem;
}
.fh-form-field label,
.fh-form-field legend {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-charcoal);
	margin-bottom: 0.35rem;
	padding: 0;
}
.fh-form-field input[type="text"],
.fh-form-field input[type="email"],
.fh-form-field input[type="tel"],
.fh-form-field input[type="date"],
.fh-form-field input[type="number"],
.fh-form-field select,
.fh-form-field textarea {
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 0.92rem;
	color: var(--color-charcoal);
	background-color: #fff;
}
.fh-form-field textarea {
	resize: vertical;
}
.fh-form-field input.is-invalid,
.fh-form-field select.is-invalid,
.fh-form-field textarea.is-invalid {
	border-color: #c0392b;
}
.fh-form-field--radios {
	border: none;
	padding: 0;
	margin: 0 0 1.25rem;
}
.fh-radio-label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 400;
	font-size: 0.9rem;
	margin-right: 1.25rem;
}
.fh-inquiry-form__submit {
	width: 100%;
	text-align: center;
	border: none;
}
.fh-inquiry-form__success {
	text-align: center;
	padding: 1.5rem 0.5rem;
	color: var(--color-forest);
	font-size: 1.02rem;
}

@media (min-width: 480px) {
	.fh-form-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------------------------------------------------------------------
   Property card + grid (every page — homepage Featured Homes, the
   property archive, and both taxonomy archives all use this)
------------------------------------------------------------------------ */
.fh-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
}
.fh-property-card {
	background-color: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(43, 42, 39, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}
.fh-property-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 28px rgba(43, 42, 39, 0.12);
}
.fh-property-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: var(--color-border);
}
.fh-property-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.fh-property-card:hover .fh-property-card__media img {
	transform: scale(1.05);
}
.fh-property-card__media-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--color-forest), var(--color-gold));
}
.fh-property-card__body {
	padding: 1.25rem 1.4rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.fh-property-card__location {
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-terracotta);
	font-weight: 600;
}
.fh-property-card__title {
	margin: 0;
	font-size: 1.2rem;
}
.fh-property-card__title a {
	color: var(--color-forest);
	text-decoration: none;
}
.fh-property-card__title a:hover {
	color: var(--color-terracotta);
}
.fh-property-card__home-type {
	font-size: 0.85rem;
	color: #6b685e;
}
.fh-property-card__summary {
	font-size: 0.9rem;
	color: #55534c;
	margin: 0.25rem 0;
}
.fh-property-card__prices {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	font-size: 0.88rem;
	color: var(--color-charcoal);
	margin-bottom: 0.75rem;
}
.fh-property-card__cta {
	margin-top: auto;
}

@media (min-width: 640px) {
	.fh-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1024px) {
	.fh-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---------------------------------------------------------------------
   Plain pages (Privacy Policy, Terms & Conditions, Refund Policy, etc.)
------------------------------------------------------------------------ */
.fh-page {
	padding: 2.5rem 0 4rem;
}
.fh-page__inner {
	max-width: 820px;
	margin: 0 auto;
}
.fh-page__title {
	margin-bottom: 0.5rem;
}
.fh-page__content h2 {
	font-size: 1.35rem;
	margin-top: 2.25rem;
	margin-bottom: 0.75rem;
}
.fh-page__content h2:first-child {
	margin-top: 0;
}
.fh-page__content h3 {
	font-size: 1.1rem;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}
.fh-page__content p {
	line-height: 1.75;
	color: #45443d;
	margin: 0 0 1rem;
}
.fh-page__content ul,
.fh-page__content ol {
	padding-left: 1.4rem;
	margin: 0 0 1rem;
	color: #45443d;
	line-height: 1.75;
}
.fh-page__content li {
	margin-bottom: 0.4rem;
}
.fh-page__content a {
	text-decoration: underline;
}

/* ---------------------------------------------------------------------
   Search results + 404 (share the .fh-page wrapper above)
------------------------------------------------------------------------ */
.fh-search-results {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}
.fh-search-results__item {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--color-border);
}
.fh-search-results__item:first-child {
	padding-top: 0;
}
.fh-search-results__type {
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-terracotta);
	font-weight: 600;
}
.fh-search-results__title {
	font-size: 1.15rem;
	margin: 0.25rem 0 0.4rem;
}
.fh-search-results__title a {
	text-decoration: none;
}
.fh-search-results__title a:hover {
	text-decoration: underline;
}
.fh-search-results__excerpt {
	color: #45443d;
	margin: 0;
	line-height: 1.6;
}

.fh-404 .search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.5rem 0;
}
.fh-404 .search-field {
	flex: 1 1 240px;
	padding: 0.7rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 1rem;
}
.fh-404 .search-submit {
	padding: 0.7rem 1.5rem;
	border: none;
	border-radius: 6px;
	background-color: var(--color-gold);
	color: var(--color-charcoal); /* was #fff at 2.6:1 against gold — fails AA */
	font-weight: 600;
	cursor: pointer;
}
.fh-404 .search-submit:hover {
	background-color: var(--color-terracotta);
	color: #fff;
}
.fh-404__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1rem;
}
