/*
Theme Name: SDMP Mountain
Theme URI: https://sandiegomountainproperties.com
Author: New Found Agency
Author URI: https://newfoundagency.com
Description: A custom theme for San Diego Mountain Properties — mountain homes, land, ranches, and off-grid property listings across San Diego County's backcountry.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sdmp-mountain
*/

/* ============================================================
   DESIGN TOKENS
   Palette named for the terrain this brokerage actually sells:
   chaparral scrub, manzanita bark, dry-grass hillsides, granite,
   and the blue haze of distant ridgelines.
   ============================================================ */
:root {
  --ink: #2B2B26;
  --ink-soft: #4A4A3F;
  --sage: #6B7A5E;
  --sage-dark: #52604A;
  --sage-light: #A9B79A;
  --clay: #A8531D;
  --clay-dark: #7E3D14;
  --grass: #DCCFA3;
  --grass-light: #EAE0C4;
  --stone: #F1EEE4;
  --white: #FBFAF5;
  --haze: #8FA6AF;
  --line: rgba(43, 43, 38, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 3px;
  --container: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--clay-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-bottom: 0.9em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--clay);
  color: var(--white);
}
.btn-primary:hover { background: var(--clay-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--white);
}
.btn-outline:hover { background: rgba(251,250,245,0.12); }
.btn-outline.on-light {
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline.on-light:hover { background: rgba(43,43,38,0.06); }

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.site-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-top: 2px;
}
.site-logo:hover { text-decoration: none; }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.primary-nav > div > ul > li { position: relative; }
.primary-nav a {
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 600;
}
.primary-nav > div > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.4em 0;
}
.primary-nav a:hover { color: var(--clay-dark); text-decoration: none; }

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 220px;
  box-shadow: 0 12px 28px rgba(43,43,38,0.09);
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu li a {
  display: block;
  padding: 0.55em 0.75em;
  border-radius: var(--radius);
  font-weight: 500;
}
.primary-nav .sub-menu li a:hover { background: var(--stone); text-decoration: none; }
.menu-item-has-children > a::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
}

.header-cta { display: flex; align-items: center; gap: 1.4rem; }
.header-phone {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ============================================================
   CONTOUR / TOPO DECORATION
   Signature device: land + elevation data is the one thing every
   page on this site is ultimately about, so a topographic contour
   line motif marks hero sections, dividers, and location cards.
   ============================================================ */
.topo-field {
  background-image: url('assets/images/topo.svg');
  background-repeat: no-repeat;
  background-position: right -80px top -60px;
  background-size: 720px auto;
}
.topo-divider {
  height: 46px;
  background-image: url('assets/images/topo.svg');
  background-repeat: repeat-x;
  background-size: 260px auto;
  background-position: center;
  opacity: 0.5;
}

/* ============================================================
   HERO (front page)
   ============================================================ */
.hero {
  background: linear-gradient(180deg, var(--grass-light) 0%, var(--grass) 100%);
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero .container { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { color: var(--ink-soft); margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero .btn-outline { color: var(--ink); border-color: var(--ink); }
.hero .btn-outline:hover { background: rgba(43,43,38,0.06); }

/* Page (non-front) hero */
.page-hero {
  background: var(--stone);
  padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { color: var(--sage-dark); }
.page-hero h1 { max-width: 34em; }

/* ============================================================
   PROPERTY TYPE GRID
   ============================================================ */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { max-width: 42em; margin-bottom: 2.4rem; }
.section-alt { background: var(--stone); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.type-card {
  background: var(--white);
  padding: 1.9rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.15s ease;
}
.type-card:hover { background: var(--stone); text-decoration: none; }
.type-card svg { width: 30px; height: 30px; color: var(--sage-dark); }
.type-card h3 { font-size: 1.02rem; margin-bottom: 0.15em; color: var(--ink); }
.type-card p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.type-card .go {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clay-dark);
}

/* ============================================================
   WHY SDMP
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem 2.4rem;
}
.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.why-item .num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sage-light);
  line-height: 1;
}
.why-item p { margin: 0; color: var(--ink-soft); }
.why-item strong { display: block; color: var(--ink); font-family: var(--font-body); margin-bottom: 0.2em; }

/* ============================================================
   AREAS WE SERVE — elevation cards
   ============================================================ */
.area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.area-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.8rem;
  background: var(--white);
}
.area-card .elevation {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--haze);
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.9em;
}
.area-card .elevation::before {
  content: "";
  width: 16px; height: 1px;
  background: var(--haze);
}
.area-card h3 { margin-bottom: 0.35em; }
.area-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 1em; }
.area-card a.go { font-size: 0.82rem; font-weight: 700; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--ink);
  color: var(--white);
  padding: clamp(2.6rem, 6vw, 4rem) 0;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.cta-band h2 { color: var(--white); margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); max-width: 26em; }
.cta-band .phone-line { color: var(--grass-light); font-size: 1rem; margin-top: 0.4em; }
.cta-band .phone-line a { color: var(--grass-light); font-weight: 700; }

/* ============================================================
   IDX / BUILD NOTES (visible only in editing context, styled
   as a clearly-labeled placeholder box so it never looks like
   finished content)
   ============================================================ */
.build-note {
  border: 1px dashed var(--haze);
  border-radius: var(--radius);
  background: var(--stone);
  padding: 1.1rem 1.3rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 1.8rem 0;
}
.build-note::before {
  content: "Build note";
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.4em;
}
.idx-feed-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.4rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 2rem 0;
}

/* ============================================================
   ENTRY CONTENT (page.php)
   ============================================================ */
.entry-content {
  max-width: 46em;
}
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1.1em; }
.entry-content ul li { margin-bottom: 0.4em; }
.entry-content a { text-decoration: underline; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--grass-light);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(251,250,245,0.14);
}
.footer-brand .site-logo { color: var(--white); }
.footer-brand .site-logo span { color: var(--sage-light); }
.footer-brand p { color: rgba(251,250,245,0.65); font-size: 0.9rem; margin-top: 1rem; max-width: 26em; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 1rem;
}
.footer-col li { margin-bottom: 0.6em; font-size: 0.92rem; }
.footer-col a { color: var(--grass-light); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: rgba(251,250,245,0.5);
}
.footer-bottom a { color: rgba(251,250,245,0.6); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .primary-nav { position: fixed; inset: 84px 0 0 0; background: var(--white); padding: 1.5rem; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav > div > ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .primary-nav > div > ul > li { width: 100%; border-bottom: 1px solid var(--line); }
  .primary-nav > div > ul > li > a { padding: 1em 0; width: 100%; }
  .primary-nav .sub-menu { display: block; position: static; border: none; box-shadow: none; padding-left: 1rem; }
  .primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  .type-grid { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}
