/* Whittling Ridge Farms — Modern Heritage Static Site (Cloudflare Pages) */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-alt: #f2ede4;
  --ink: #1d2428;
  --ink-muted: #4a555c;
  --brand: #1b3a4b;
  --brand-hover: #132a37;
  --forest: #2e5339;
  --accent: #9e6b3b;
  --border: #e3dcd0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(27, 58, 75, 0.08);
  --shadow-lg: 0 12px 32px rgba(27, 58, 75, 0.14);
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.brand-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--surface-alt);
  color: var(--brand);
  text-decoration: none;
}
.site-nav a.nav-cta {
  background: var(--brand);
  color: #fff;
  margin-left: 6px;
}
.site-nav a.nav-cta:hover { background: var(--brand-hover); color: #fff; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: flex-end;
  background-color: var(--brand);
  background-size: cover;
  background-position: center 35%;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 28, 34, 0.86) 0%,
    rgba(18, 28, 34, 0.42) 48%,
    rgba(18, 28, 34, 0.12) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 0 56px;
  max-width: 720px;
  color: #fff;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f4dcc2;
  margin-bottom: 10px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 26px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none !important;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #85582f; color: #fff; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--surface-alt); }
.btn-outline-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: rgba(255,255,255,0.22); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin-bottom: 6px;
}
.section-sub { color: var(--ink-muted); margin: 0; max-width: 640px; }

/* Page Header (inner pages) */
.page-hero {
  background: var(--brand);
  color: #fff;
  padding: 48px 0 42px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.88); margin: 0; max-width: 720px; font-size: 1.05rem; }

/* Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e9e4da;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(27, 58, 75, 0.92);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-price {
  left: auto;
  right: 12px;
  background: rgba(46, 83, 57, 0.94);
}
.badge-sold {
  background: #8b2635;
}
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title { font-size: 1.35rem; margin-bottom: 8px; }
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.fact-pill {
  font-size: 0.8rem;
  background: var(--surface-alt);
  color: var(--ink);
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 500;
}
.card-summary {
  color: var(--ink-muted);
  font-size: 0.94rem;
  margin: 0 0 18px;
  flex: 1;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* Detailed Listing Layout (Media ABOVE/BESIDE Write-Up) */
.listing-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.listing-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.listing-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.listing-header-bar h2 { margin: 0; font-size: 1.85rem; }
.price-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forest);
  background: #e7f1ea;
  padding: 6px 14px;
  border-radius: 8px;
}
.media-stack { display: flex; flex-direction: column; gap: 14px; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.photo-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.photo-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}
.listing-copy p { margin: 0 0 14px; color: var(--ink); }
.listing-cta-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-alt);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.filter-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Standards Strip & Two Farms */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.standard-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.standard-item strong { display: block; color: var(--brand); margin-bottom: 4px; font-size: 1rem; }
.standard-item span { font-size: 0.9rem; color: var(--ink-muted); }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.farm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.farm-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.farm-card-body { padding: 24px; }

/* Prose */
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 860px;
}
.prose-card h2 { margin-top: 28px; font-size: 1.45rem; }
.prose-card h2:first-child { margin-top: 0; }

/* Contact Banner */
.contact-banner {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.contact-banner h2 { color: #fff; margin-bottom: 6px; }
.contact-banner p { color: rgba(255,255,255,0.88); margin: 0; }

/* Footer */
.site-footer {
  background: #142630;
  color: #d6e0e6;
  padding: 48px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.site-footer a { color: #e8f1f5; }
.site-footer a:hover { color: #f4dcc2; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-size: 0.86rem;
  color: #a9bcc7;
}

@media (max-width: 860px) {
  .listing-detail-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav a.nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .hero { min-height: 460px; }
  .hero-content { padding: 56px 0 36px; }
}
