/* Farmhouse Developers - Premium Design System */
:root {
  --forest: #14532D;
  --deep: #064E25;
  --nature: #65A30D;
  --earth: #79502F;
  --sunrise: #F59E0B;
  --cream: #FAF9F4;
  --white: #FFFFFF;
  --ink: #202820;
  --muted: #5A655A;
  --border: #E3E1D6;
  --shadow-sm: 0 4px 14px rgba(20, 83, 45, 0.06);
  --shadow-md: 0 12px 32px rgba(20, 83, 45, 0.10);
  --shadow-lg: 0 24px 56px rgba(6, 78, 37, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--deep); }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); line-height: 1.2; margin: 0 0 0.75rem; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
p { margin: 0 0 1rem; color: var(--muted); }

:focus-visible { outline: 3px solid var(--sunrise); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 1.25rem; }
.section { padding-block: 5rem; }
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-forest { background: var(--forest); color: var(--white); }
.section-forest h2, .section-forest h3, .section-forest p { color: var(--white); }
.section-forest p { opacity: 0.9; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--nature);
  margin-bottom: 0.65rem;
}
.section-forest .eyebrow { color: var(--sunrise); }

.section-header { max-width: 720px; margin-bottom: 2.75rem; }
.section-header.center { margin-inline: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.65rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--deep); color: var(--white); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--sunrise); color: var(--ink); }
.btn-accent:hover { background: #e08e07; color: var(--ink); }
.btn-outline { background: transparent; border-color: var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-outline-white { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.75); color: var(--white); backdrop-filter: blur(4px); }
.btn-outline-white:hover { background: var(--white); color: var(--forest); }
.btn-earth { background: var(--earth); color: var(--white); }
.btn-earth:hover { background: #623f24; color: var(--white); }
.btn-sm { min-height: 40px; padding: 0.5rem 1.15rem; font-size: 0.875rem; }

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  padding-block: 0.85rem;
}
.site-header.is-transparent {
  background: linear-gradient(180deg, rgba(10, 28, 16, 0.72) 0%, rgba(10, 28, 16, 0) 100%);
}
.site-header.is-solid,
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(20, 83, 45, 0.08);
  padding-block: 0.65rem;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand-logo { display: inline-flex; align-items: center; gap: 0.65rem; border-radius: 12px; transition: background-color 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease; }
.brand-logo img { height: 56px; width: auto; object-fit: contain; transition: height 0.25s ease; }
.site-header.scrolled .brand-logo img,
.site-header.is-solid .brand-logo img { height: 50px; }
.site-header.is-transparent:not(.scrolled) .brand-logo {
  background: rgba(255, 255, 255, 0.94);
  padding: 6px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
@media (max-width: 640px) {
  .brand-logo img { height: 44px; }
  .site-header.is-transparent:not(.scrolled) .brand-logo { padding: 4px 10px; }
}

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  padding-block: 0.4rem;
  position: relative;
}
.site-header.is-transparent:not(.scrolled) .nav-links a { color: var(--white); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--sunrise);
  transition: width 0.2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
}
.site-header.is-solid .mobile-toggle,
.site-header.scrolled .mobile-toggle { color: var(--forest); border-color: var(--border); }

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
}

/* Mobile Drawer Dialog */
dialog.mobile-drawer {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(340px, 88vw);
  border: 0;
  padding: 1.75rem 1.5rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: -12px 0 40px rgba(0,0,0,0.2);
}
dialog.mobile-drawer[open] { display: flex; flex-direction: column; gap: 1.25rem; }
.mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.mobile-drawer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mobile-drawer-links a { display: block; padding: 0.75rem 0.5rem; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid #f0efe9; color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-block: 8rem 6rem;
  overflow: hidden;
  background: var(--deep);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(6, 78, 37, 0.84) 0%, rgba(20, 83, 45, 0.56) 55%, rgba(16, 26, 18, 0.45) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 680px; color: var(--white); text-align: left; }
.hero-content h1 { color: var(--white); margin-bottom: 1.15rem; }
.hero-content p { color: rgba(255,255,255,0.92); font-size: clamp(1.05rem, 1.4vw, 1.25rem); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Page Banner (inner pages) */
.page-banner {
  background: linear-gradient(120deg, var(--deep) 0%, var(--forest) 100%);
  color: var(--white);
  padding: 8.5rem 0 3.75rem;
  position: relative;
}
.page-banner h1 { color: var(--white); font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 0.5rem; }
.page-banner p { color: rgba(255,255,255,0.88); max-width: 660px; margin: 0; }
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.75); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--sunrise); }

/* Search Panel */
.search-panel-wrap { margin-top: -3.25rem; position: relative; z-index: 10; }
.search-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  align-items: end;
}
@media (max-width: 1100px) { .search-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .search-grid { grid-template-columns: 1fr; } }

/* Form Controls */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.15rem; }
.search-panel .field { margin-bottom: 0; }
label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #C9CCC6;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.14);
}
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #b91c1c; }
.field-error { color: #b91c1c; font-size: 0.82rem; min-height: 1.1em; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }

/* Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
@media (max-width: 960px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-value { font-family: var(--font-serif); font-size: 2.15rem; font-weight: 700; color: var(--forest); line-height: 1.1; margin-bottom: 0.35rem; }
.stat-label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }

/* Grids & Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
@media (max-width: 1024px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #e8e7df; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-badge {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  background: rgba(20, 83, 45, 0.92);
  color: var(--white);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.card-badge.demo { left: auto; right: 0.85rem; background: rgba(121, 80, 47, 0.92); }
.card-body { padding: 1.35rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.84rem; color: var(--muted); margin-bottom: 0.75rem; }
.card-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.card-price { font-weight: 700; color: var(--earth); font-size: 1.05rem; margin-top: auto; padding-top: 0.75rem; margin-bottom: 0.9rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }

/* Page-specific Responsive Layouts */
.project-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }
.project-sidebar { position: sticky; top: 6rem; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-block: 1.25rem; }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 1.5rem; }
@media (max-width: 960px) {
  .project-layout { grid-template-columns: 1fr; gap: 2rem; }
  .project-sidebar { position: static; }
}
@media (max-width: 768px) {
  .section { padding-block: 3.25rem; }
  .hero { min-height: 78svh; padding-block: 7rem 4.75rem; }
  .page-banner { padding: 6.75rem 0 2.75rem; }
  .search-panel-wrap { margin-top: -2rem; }
  .search-panel { padding: 1.25rem; }
}
@media (max-width: 560px) {
  .spec-grid, .vision-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 1.25rem 0.85rem; }
  .stat-value { font-size: 1.75rem; }
  .hero-actions .btn { width: 100%; }
  .whatsapp-float { width: 50px; height: 50px; right: 1rem; bottom: 1rem; font-size: 1.45rem; }
}

/* Lifestyle Tiles */
.lifestyle-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.lifestyle-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.lifestyle-card:hover img { transform: scale(1.06); }
.lifestyle-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(6, 78, 37, 0.88) 100%);
}
.lifestyle-card-content { position: relative; z-index: 2; padding: 1.25rem; }
.lifestyle-card-content h3 { color: var(--white); font-size: 1.15rem; margin-bottom: 0.25rem; }
.lifestyle-card-content p { color: rgba(255,255,255,0.85); font-size: 0.82rem; margin: 0; }

/* Feature Icon Boxes */
.feature-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(101, 163, 13, 0.14);
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* Gallery & Filter Tabs */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.filter-tab {
  min-height: 42px;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-tab.active, .filter-tab:hover { background: var(--forest); color: var(--white); border-color: var(--forest); }

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  position: relative;
  border: 0;
  padding: 0;
  background: #e8e7df;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* Native Modal Dialog Lightbox */
dialog:modal {
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(960px, 94vw);
  max-height: 90dvh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(10, 22, 14, 0.8);
  backdrop-filter: blur(4px);
}
.lightbox-body { position: relative; }
.lightbox-body img { width: 100%; max-height: 75dvh; object-fit: contain; background: #111812; }
.lightbox-caption { padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lightbox-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,0.65); color: #fff;
  font-size: 1.25rem; cursor: pointer;
}

/* Alerts */
.alert { padding: 0.95rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1.15rem; font-weight: 500; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Testimonials */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stars { color: var(--sunrise); font-size: 0.95rem; }

/* Footer */
.site-footer { background: #0D2315; color: rgba(255,255,255,0.85); padding-top: 4.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { color: rgba(255,255,255,0.78); font-size: 0.92rem; }
.footer-links a:hover { color: var(--sunrise); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-block: 1.35rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.88rem; color: rgba(255,255,255,0.68); }
.social-row { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-row a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--sunrise); color: var(--ink); }

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
.whatsapp-float:hover { background: #1eb956; color: #fff; transform: scale(1.05); }
