/* ============================================================
   Terillian Real Estate — design system
   ============================================================ */

:root {
	--color-navy: #16283f;
	--color-navy-dark: #0e1b2c;
	--color-gold: #c8983f;
	--color-gold-dark: #a67a2c;
	--color-bg: #f6f5f1;
	--color-surface: #ffffff;
	--color-text: #202a33;
	--color-text-muted: #5c6b78;
	--color-border: #e3e0d7;

	--color-available: #2f8f5b;
	--color-sold: #3457a6;
	--color-unavailable: #7a828c;
	--color-pending: #c07a1f;

	--font-heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--radius: 10px;
	--shadow-sm: 0 1px 2px rgba(14, 27, 44, 0.06), 0 1px 1px rgba(14, 27, 44, 0.04);
	--shadow-md: 0 8px 24px rgba(14, 27, 44, 0.10);
	--container-width: 1140px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-gold-dark); text-decoration: none; }
a:hover { color: var(--color-navy); }

h1, h2, h3, h4, h5 {
	font-family: var(--font-heading);
	font-weight: normal;
	color: var(--color-navy);
	margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; }

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 24px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
	background: var(--color-gold);
	color: #fff;
}
.btn-gold:hover { background: var(--color-gold-dark); color: #fff; }

.btn-outline {
	background: transparent;
	border-color: rgba(255,255,255,0.6);
	color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }

.btn-navy {
	background: var(--color-navy);
	color: #fff;
}
.btn-navy:hover { background: var(--color-navy-dark); color: #fff; }

/* ---------- icons ---------- */

.icon {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.15em;
}

/* ---------- header / nav ---------- */

.site-header {
	background: var(--color-navy);
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: var(--shadow-sm);
}

.nav-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
}

.nav-bar nav { display: contents; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-family: var(--font-heading);
	font-size: clamp(1rem, 4.5vw, 1.25rem);
	letter-spacing: 0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.brand:hover { color: var(--color-gold); }
.brand .icon { color: var(--color-gold); width: 1.3em; height: 1.3em; }

.nav-toggle {
	display: none;
	background: none;
	border: none;
	color: #fff;
	padding: 8px;
	cursor: pointer;
}
.nav-toggle .icon { width: 26px; height: 26px; }

.nav-links {
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-links a {
	display: block;
	color: #dfe6ee;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.2px;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a[aria-current="page"] { color: var(--color-gold); }

@media (max-width: 800px) {
	.nav-toggle { display: block; }
	.nav-links {
		position: absolute;
		top: 72px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		background: var(--color-navy-dark);
		padding: 8px 16px 20px;
		gap: 0;
		display: none;
	}
	.nav-links.is-open { display: flex; }
	.nav-links a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
}

/* ---------- hero (home) ---------- */

.hero {
	position: relative;
	color: #fff;
	background-color: var(--color-navy-dark);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14,27,44,0.55) 0%, rgba(14,27,44,0.78) 100%);
}
.hero-inner {
	position: relative;
	padding-top: 88px;
	padding-bottom: 76px;
	max-width: 720px;
}
.hero-eyebrow {
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--color-gold);
	margin-bottom: 14px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p.lede { font-size: 1.15rem; color: #e6ebf1; max-width: 600px; }
.hero-actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 28px;
}

/* ---------- page banner (interior pages) ---------- */

.page-banner {
	background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
	color: #fff;
	padding: 24px 0;
}
.page-banner h1 { color: #fff; margin: 0; }

/* ---------- sections ---------- */

.section { padding: 56px 0; flex: 1 0 auto; }
.section-intro { max-width: 720px; color: var(--color-text-muted); font-size: 1.05rem; }

.section-title-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

/* ---------- home: intro + highlights ---------- */

.intro-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 48px;
	align-items: start;
}
@media (max-width: 800px) {
	.intro-grid { grid-template-columns: 1fr; }
}

.highlight-list {
	display: grid;
	gap: 18px;
}
.highlight-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 20px 22px;
	display: flex;
	gap: 14px;
	align-items: flex-start;
}
.highlight-card .icon {
	color: var(--color-gold-dark);
	width: 26px; height: 26px;
	flex-shrink: 0;
	margin-top: 2px;
}
.highlight-card h4 { margin-bottom: 4px; }
.highlight-card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

.quick-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
}
.quick-link-card {
	background: var(--color-navy);
	color: #fff;
	border-radius: var(--radius);
	padding: 26px 20px;
	text-align: center;
	transition: transform .15s ease, box-shadow .15s ease;
}
.quick-link-card:hover { color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-link-card .icon { width: 30px; height: 30px; color: var(--color-gold); margin: 0 auto 10px; }
.quick-link-card span { display: block; font-weight: 600; }

/* ---------- property cards ---------- */

.property-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 26px;
	margin-top: 30px;
}

.property-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.property-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-border); }
.property-media img { width: 100%; height: 100%; object-fit: cover; }

.status-pill {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #fff;
}
.status-pill.available { background: var(--color-available); }
.status-pill.sold { background: var(--color-sold); }
.status-pill.unavailable { background: var(--color-unavailable); }
.status-pill.pending { background: var(--color-pending); }

.property-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.property-body h3 { margin: 0; font-size: 1.15rem; }
.property-body h3 a { color: var(--color-navy); }
.property-body h3 a:hover { color: var(--color-gold-dark); }

.property-meta {
	display: flex;
	gap: 18px;
	color: var(--color-text-muted);
	font-size: 0.9rem;
}
.property-meta span { display: inline-flex; align-items: center; gap: 6px; }
.property-meta .icon { width: 17px; height: 17px; color: var(--color-gold-dark); }

.property-body .btn { margin-top: auto; align-self: flex-start; }

/* ---------- property detail ---------- */

.detail-header { margin-bottom: 8px; }
.detail-header .status-pill { position: static; display: inline-flex; margin-bottom: 12px; }

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin: 24px 0 8px;
}
.gallery-grid a { border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-grid img {
	width: 100%; height: 100%; object-fit: cover;
	cursor: zoom-in;
	transition: transform .2s ease;
}
.gallery-grid a:hover img { transform: scale(1.05); }
@media (max-width: 700px) {
	.gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

.property-info-box {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-left: 4px solid var(--color-gold);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin: 28px 0;
}
.property-info-box h4 { display: flex; align-items: center; gap: 8px; }

.detail-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	margin-top: 8px;
}
@media (max-width: 700px) {
	.detail-columns { grid-template-columns: 1fr; }
}
.detail-columns ul { list-style: none; margin: 0; padding: 0; }
.detail-columns li {
	padding: 9px 0;
	border-bottom: 1px solid var(--color-border);
	font-size: 1rem;
	color: var(--color-text);
}
.detail-columns li:first-child { padding-top: 0; }

/* ---------- lightbox ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 16, 26, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close, .lightbox-prev, .lightbox-next {
	position: absolute;
	background: rgba(255,255,255,0.1);
	border: none;
	color: #fff;
	width: 44px; height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
	position: absolute;
	bottom: 24px;
	left: 0; right: 0;
	text-align: center;
	color: #dfe6ee;
	font-size: 0.9rem;
}

/* ---------- resources ---------- */

.resource-section { margin-bottom: 48px; }
.resource-section h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--color-border);
	margin-bottom: 24px;
}
.resource-section h2 .icon { color: var(--color-gold-dark); width: 24px; height: 24px; }

.resource-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}
.resource-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 18px 20px;
}
.resource-card h5 { margin: 0 0 10px; font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--color-navy); }
.resource-card .row-line {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
	margin-bottom: 6px;
	color: var(--color-text-muted);
}
.resource-card .row-line .icon { color: var(--color-gold-dark); width: 16px; height: 16px; flex-shrink: 0; }
.resource-card .row-line a { color: var(--color-text); }
.resource-card .row-line a:hover { color: var(--color-gold-dark); }

/* ---------- contact ---------- */

.contact-grid {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 48px;
	align-items: start;
}
@media (max-width: 800px) {
	.contact-grid { grid-template-columns: 1fr; }
}

.contact-card {
	background: var(--color-navy);
	color: #fff;
	border-radius: var(--radius);
	padding: 32px;
}
.contact-card h3 { color: #fff; }
.contact-card .row-line {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	color: #dfe6ee;
}
.contact-card .row-line .icon { color: var(--color-gold); width: 19px; height: 19px; flex-shrink: 0; }
.contact-card .row-line a { color: #fff; }
.contact-card .row-line a:hover { color: var(--color-gold); }
.contact-card img.logo { margin-top: 22px; max-width: 160px; opacity: 0.95; }

.form-group { margin-bottom: 18px; }
.form-group label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
	color: var(--color-navy);
}
.form-group .field-error {
	color: #b3261e;
	font-size: 0.82rem;
	margin-left: 8px;
	font-weight: 500;
}
.form-control {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	font-family: var(--font-body);
	font-size: 1rem;
	background: var(--color-surface);
	color: var(--color-text);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
	outline: none;
	border-color: var(--color-gold);
	box-shadow: 0 0 0 3px rgba(200, 152, 63, 0.2);
}
.form-control.is-invalid { border-color: #b3261e; }
textarea.form-control { resize: vertical; min-height: 140px; }

.form-status {
	margin-top: 14px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.92rem;
	display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: #e6f4ec; color: #1f6b41; }
.form-status.error { background: #fbeaea; color: #a3241c; }

/* ---------- footer ---------- */

.site-footer {
	background: var(--color-navy-dark);
	color: #b9c4d0;
	padding: 44px 0 28px;
	margin-top: 56px;
}
.footer-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
}
.footer-contact { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; font-size: 0.92rem; }
.footer-contact a { color: #dfe6ee; display: inline-flex; align-items: center; gap: 6px; }
.footer-contact a:hover { color: var(--color-gold); }
.footer-contact .icon { width: 16px; height: 16px; }
.copyright { font-size: 0.82rem; color: #7c8a97; margin: 0; }

/* ---------- 404 ---------- */

.not-found { text-align: center; padding: 80px 0; }
.not-found img { margin: 24px auto 0; max-width: 200px; }
