/* Pyrenees Properties — static site (Cloudflare Pages) */
:root {
  /* Cream + logo gold/black (sampled from assets/images/logo.png) */
  --bg: #f7f3ee;
  --bg-card: #ffffff;
  --ink: #1a1818;
  --ink-muted: #5c534a;
  --accent: #c5a059;
  --accent-dark: #9a7d32;
  --accent-soft: #f3ead4;
  --border: #e4d9c4;
  --ok: #3d6b4f;
  --shadow: 0 8px 24px rgba(26, 24, 24, 0.08);
  --radius: 12px;
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--accent-dark); }
a:hover { color: var(--ink); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  height: 74px; /* ~1.42× prior 52px */
  width: auto;
  max-height: 74px;
}

@media (max-width: 560px) {
  .brand img {
    height: 58px;
    max-height: 58px;
  }
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
}

.nav .cta-link {
  background: var(--ink);
  color: #fff !important;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid var(--accent);
}

.nav .cta-link:hover {
  background: var(--accent);
  color: var(--ink) !important;
}

/* Main */
main {
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(26,24,24,0.78), rgba(154,125,50,0.45)),
    url("images/westview-exterior.jpg") center/cover no-repeat;
  color: #fff;
  padding: 3.5rem 1.25rem;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 18ch;
}

.hero p {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 36rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: #fff;
  color: var(--ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.65);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

/* Sections */
.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
}

.section-lead {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
  max-width: 40rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e0d8;
}

.card img.card-photo,
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: zoom-in;
}

.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-body h2,
.card-body h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card-body p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  flex: 1;
}

.meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.price {
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.badge-open {
  background: #dce8e1;
  color: var(--ok);
}

.badge-empty {
  background: #efe8e2;
  color: var(--ink-muted);
}

/* Listing detail */
.listing-hero {
  margin: 2.5rem 0;

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 760px) {
  .listing-hero { grid-template-columns: 1fr; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain; /* letterbox portrait/mixed; do not stretch */
  object-position: center;
  background: #efe8e2;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: contain;
}

.listing-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.listing-panel h1 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}

.fees {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

.fees h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.fees ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-muted);
}

.fees li { margin-bottom: 0.35rem; }

.empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}

.empty-state h2 { margin-top: 0; }

.quiet-link {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.contact-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-width: 32rem;
}

.contact-block a {
  font-weight: 600;
  text-decoration: none;
}

.contact-block a:hover { text-decoration: underline; }

.cta-band {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band p { margin: 0; max-width: 28rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #f0e6dc;
  margin-top: auto;
  border-top: 3px solid var(--accent);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer a { color: #f0e6dc; }
.site-footer p { margin: 0.25rem 0; font-size: 0.9rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a { text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { text-decoration: underline; }

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-header p {
  margin: 0;
  color: var(--ink-muted);
}


.media-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efe8e2;
  color: var(--ink-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.95rem;
}

/* Lightbox */
.lightbox[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  cursor: default;
  background: transparent;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}


/* Nav dropdown — South Springfield group */
.nav-item {
  position: relative;
}

.nav-drop-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-drop-btn::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.7;
}

.nav-drop-btn:hover,
.nav-item.is-open > .nav-drop-btn,
.nav-item:focus-within > .nav-drop-btn,
.nav-drop-btn[aria-expanded="true"] {
  color: var(--accent-dark);
}

.nav-drop-btn[aria-current="page"],
.nav-item.is-active > .nav-drop-btn {
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
}

.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 11rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nav-submenu a {
  display: block;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 0 !important;
}

.nav-submenu a:hover,
.nav-submenu a[aria-current="page"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

/* Desktop: hover/focus dropdown */
@media (min-width: 761px) {
  .nav-submenu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    display: none;
    z-index: 60;
  }
  .nav-item:hover > .nav-submenu,
  .nav-item:focus-within > .nav-submenu,
  .nav-item.is-open > .nav-submenu {
    display: block;
  }
}

/* Mobile: expandable nested list with indent */
@media (max-width: 760px) {
  .nav-item {
    width: 100%;
  }
  .nav-submenu {
    display: none;
    position: static;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--accent);
    border-radius: 0;
    margin: 0.15rem 0 0.25rem 0.35rem;
    padding: 0.15rem 0;
    background: transparent;
    min-width: 0;
  }
  .nav-item.is-open > .nav-submenu {
    display: block;
  }
  .nav-submenu a {
    padding: 0.35rem 0.65rem;
  }
  .nav-drop-btn.is-open::after,
  .nav-drop-btn[aria-expanded="true"]::after {
    transform: rotate(225deg) translateY(-1px);
  }
}

/* Footer nested South Springfield group */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-start;
}

.footer-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 8rem;
}

.footer-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0;
}

.footer-group-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(197, 160, 89, 0.45);
}

.footer-group-links a {
  font-size: 0.9rem;
}
