/*
Theme Name: Farmer Realty Services
Theme URI: https://farmerrealtyservices.com
Author: Farmer Realty Services
Description: Custom WordPress theme for Farmer Realty Services, a residential real estate agency serving Riverside, San Bernardino, Orange, and Los Angeles Counties.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: farmer
*/

/* ================= Design tokens =================
   Palette matched to the Farmer Realty Group logo (blue roofline +
   near-black roof/text). Variable names are kept as -navy/-gold for
   minimal diff even though the "gold" role is now filled by the
   logo's brand blue. */
:root {
	--navy: #14181D;
	--navy-deep: #0B0D10;
	--navy-mid: #232A32;
	--gold: #3B9AE0;
	--gold-light: #7EC1F2;
	--gold-deep: #1F74B8;
	--cream: #F8F6F1;
	--paper: #FFFFFF;
	--ink: #1C1E22;
	--ink-soft: #4B5563;
	--line: #E6E1D6;
	--success: #2F7A4F;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow-sm: 0 2px 10px rgba(20,38,61,0.08);
	--shadow-md: 0 10px 30px rgba(20,38,61,0.14);
	--shadow-lg: 0 24px 60px rgba(13,27,46,0.22);
	--font-head: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--cream);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 16px; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 16px; color: var(--ink-soft); }
ul { padding: 0; margin: 0; list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
.eyebrow {
	display: inline-block; font-family: var(--font-body); font-weight: 700;
	font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--gold-deep); margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
	border: 2px solid transparent; cursor: pointer; transition: all .2s ease;
	white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.icon-inline { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 200; background: var(--paper);
	box-shadow: var(--shadow-sm);
}
.topbar { background: var(--navy-deep); color: rgba(255,255,255,.85); font-size: .82rem; }
.topbar .container { display: flex; justify-content: flex-end; gap: 26px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 500; }
.topbar a:hover { color: var(--gold-light); }
.topbar svg { width: 14px; height: 14px; }
.header-main { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--navy); }
.brand img, .brand-logo-img { height: 48px; width: auto; }
.brand .brand-tag { display: block; font-family: var(--font-body); font-weight: 500; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav a { font-weight: 600; font-size: .93rem; color: var(--navy); position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--gold-deep); }
.main-nav .sub-menu { display: none; }
.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-cta .btn { padding: 9px 16px; font-size: .85rem; }
.header-cta .btn svg { width: 15px; height: 15px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }
.main-nav .btn { padding: 10px 20px; font-size: .88rem; }

@media (max-width: 960px) {
	.main-nav { position: fixed; inset: 0 0 0 30%; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 90px 28px 28px; transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
	.main-nav.is-open { transform: translateX(0); }
	.main-nav ul { flex-direction: column; gap: 18px; width: 100%; }
	.nav-toggle { display: block; }
	.header-cta .btn-navy-label { display: none; }
	.topbar .container { justify-content: center; }
}

/* ---------- Hero (video) ---------- */
.hero-video { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; color: #fff; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-video::before {
	content: ''; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(180deg, rgba(13,27,46,.78) 0%, rgba(13,27,46,.55) 45%, rgba(13,27,46,.85) 100%);
}
.hero-video .container { position: relative; z-index: 2; }
.hero-video .eyebrow { color: var(--gold-light); }
.hero-video h1 { color: #fff; max-width: 760px; }
.hero-video .lede { color: rgba(255,255,255,.86); max-width: 560px; font-size: 1.15rem; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--gold-light); }
.hero-stats div span { font-size: .82rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
	background: var(--paper); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
	display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card .card-media { position: relative; height: 200px; overflow: hidden; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.07); }
.card .card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card .card-body h3 { margin-bottom: 8px; }
.card .card-body p { flex: 1; font-size: .93rem; }
.card-link { font-weight: 700; font-size: .85rem; color: var(--gold-deep); display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.icon-badge { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.icon-badge svg { width: 26px; height: 26px; color: var(--gold-light); }

/* ---------- Sections ---------- */
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin: 0 0 44px; text-align: left; }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy > .container > h2,
.bg-navy .section-head h2,
.bg-navy .section-head h3 { color: #fff; }
.bg-navy > .container > p,
.bg-navy .section-head p { color: rgba(255,255,255,.78); }
/* Cards keep their normal (dark-on-white) text color even inside a
   navy section — this was previously making area-card titles and
   descriptions render white-on-white and disappear. */
.bg-navy .card h3 { color: var(--navy); }
.bg-navy .card p { color: var(--ink-soft); }
.bg-cream { background: var(--cream); }

.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
@media (max-width: 860px) { .content-grid { grid-template-columns: 1fr; } }

.sidebar-card { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); position: sticky; top: 110px; }
.sidebar-card h4 { margin-bottom: 14px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: .93rem; color: var(--ink-soft); }
.check-list svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

.pricing-note {
	display: flex; gap: 12px; align-items: flex-start; background: var(--cream);
	border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px;
	font-size: .9rem; color: var(--ink-soft); margin-top: 22px;
}
.ledger-line { height: 1px; background: var(--line); margin: 34px 0; }

.page-hero { background: var(--navy); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: rgba(255,255,255,.8); max-width: 640px; font-size: 1.08rem; }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: var(--gold-light); }

.cta-band { background: var(--navy-deep); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.75); }
.cta-band .cta-actions { justify-content: center; }

/* ---------- Testimonials ---------- */
.testimonial-card { background: var(--paper); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.testimonial-card .stars { color: var(--gold); margin-bottom: 14px; display: flex; gap: 3px; }
.testimonial-card .stars svg { width: 16px; height: 16px; }
.testimonial-card p { font-style: italic; color: var(--ink); }
.testimonial-card .author { font-weight: 700; color: var(--navy); font-style: normal; font-size: .88rem; margin-top: 12px; }

/* ---------- Booking form ---------- */
.booking-form { background: var(--paper); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-md); }
.booking-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 640px) { .booking-form .form-row { grid-template-columns: 1fr; } }
.booking-form label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.booking-form input, .booking-form select, .booking-form textarea {
	width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	font-family: var(--font-body); font-size: .95rem; background: var(--cream); color: var(--ink);
}
.booking-form input:focus, .booking-form select:focus, .booking-form textarea:focus { outline: 2px solid var(--gold); background: #fff; }
.booking-form textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--ink-soft); margin-top: 14px; }
.form-alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-weight: 600; font-size: .92rem; }
.form-alert.success { background: #E7F5EC; color: var(--success); border: 1px solid #BFE3CB; }
.form-alert.error { background: #FCECEC; color: #B3261E; border: 1px solid #F4C6C4; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.72); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 { color: #fff; font-family: var(--font-body); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.footer-about .brand { color: #fff; margin-bottom: 14px; }
.footer-logo-chip { display: inline-flex; background: #fff; border-radius: var(--radius-sm); padding: 10px 14px; }
.footer-logo-chip img { height: 40px; width: auto; display: block; }
.footer-about p { color: rgba(255,255,255,.65); font-size: .92rem; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--gold); color: var(--navy-deep); }
.footer-social svg { width: 17px; height: 17px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a:hover { color: var(--gold-light); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.footer-contact svg { width: 16px; height: 16px; margin-top: 3px; color: var(--gold-light); flex-shrink: 0; }
.footer-bottom { padding: 22px 0; font-size: .8rem; color: rgba(255,255,255,.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; }
.footer-bottom a { color: rgba(255,255,255,.7); font-weight: 600; }
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- Reveal-on-scroll animation ----------
   Fail-safe by default: content is visible unless JS has proven it can
   run and un-hide it. html.js-reveal-ready is only added by main.js
   right before it wires up the IntersectionObserver, so if the script
   never loads/executes (blocked, erroring, slow network, plugin
   conflict, etc.) sections stay visible instead of permanently blank. */
[data-reveal] { opacity: 1; transform: none; }
html.js-reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
html.js-reveal-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Ken Burns image ---------- */
.kb-frame { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.kb-frame img { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { 0% { transform: scale(1) translate(0,0); } 100% { transform: scale(1.12) translate(-2%, -1%); } }

/* ---------- Lightbox gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid button { border: none; padding: 0; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-grid button:hover img { transform: scale(1.08); }
.lightbox { position: fixed; inset: 0; background: rgba(13,27,46,.92); z-index: 999; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: 26px; right: 30px; color: #fff; background: none; border: none; font-size: 2rem; cursor: pointer; }

/* ---------- Map embed ---------- */
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.map-frame iframe { width: 100%; height: 360px; border: 0; display: block; }

/* Misc */
.divider-gold { width: 64px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
