/* ============================================
   CLARK & CO REAL ESTATE — DESIGN SYSTEM
   ============================================ */

:root {
  --charcoal: #1A1A1A;
  --charcoal-soft: #262421;
  --limestone: #E4DFD3;
  --limestone-light: #EFEBE0;
  --paper: #FAF8F3;
  --orange: #F48222;
  --ember: #C1440E;
  --pasture: #34402F;
  --pasture-light: #4A5A42;
  --line: rgba(26,26,26,0.12);
  --line-on-dark: rgba(228,223,211,0.18);

  --font-display: "Fraunces", serif;
  --font-body: "Public Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max-width: 1280px;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- TYPOGRAPHY ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "clig" 0, "hlig" 0, "swsh" 0, "salt" 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: rgba(26,26,26,0.7);
  max-width: 46ch;
}

/* ---------- CONTOUR LINE SIGNATURE MOTIF ---------- */

.contours {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.35;
}

.contours svg { width: 100%; height: 100%; }

.divider-contour {
  height: 48px;
  margin: 0 auto;
  max-width: var(--max-width);
  opacity: 0.5;
}

/* ---------- NAV ---------- */

.site-nav {
  background: var(--charcoal);
  color: var(--limestone);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line-on-dark);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--limestone);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "clig" 0, "hlig" 0, "swsh" 0, "salt" 0;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--orange); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  font-size: 0.92rem;
}

.nav-links a {
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--orange); }
.nav-links a.active { color: var(--orange); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--orange); color: var(--charcoal); }

.nav-toggle { display: none; }

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 1.8rem;
  border-radius: 2px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--orange);
  color: var(--charcoal);
}
.btn-primary:hover { background: var(--ember); color: var(--paper); transform: translateY(-2px); }

.btn-outline {
  border-color: var(--limestone);
  color: var(--limestone);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }

.btn-dark {
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-dark:hover { background: var(--charcoal); color: var(--limestone); transform: translateY(-2px); }

/* ---------- HERO ---------- */

.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--limestone);
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; max-width: 760px; }

.hero .eyebrow { color: var(--orange); margin-bottom: 1.6rem; }

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  color: var(--paper);
  margin-bottom: 1.4rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--orange);
}

.hero .lede {
  color: rgba(228,223,211,0.75);
  font-size: 1.2rem;
  margin-bottom: 2.4rem;
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.page-hero {
  padding: 4.5rem 0 3.5rem;
}
.page-hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); color: var(--paper); }

/* ---------- DISPATCH BAR ---------- */

.dispatch-bar {
  background: var(--charcoal-soft);
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
  color: var(--limestone);
  padding: 1.6rem 0;
}

.dispatch-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(228,223,211,0.65);
}

.dispatch-bar strong {
  color: var(--orange);
  font-weight: 500;
}

/* ---------- SECTIONS ---------- */

section { padding: 5.5rem 0; }

.section-limestone { background: var(--limestone-light); }
.section-charcoal { background: var(--charcoal); color: var(--limestone); }
.section-pasture { background: var(--pasture); color: var(--limestone-light); }

.section-head {
  max-width: 640px;
  margin-bottom: 3.2rem;
}

.section-head h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin: 1rem 0 1rem;
}

/* ---------- CARD GRID ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2.4rem 2rem;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(26,26,26,0.1);
}

.card .card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ember);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.card p { color: rgba(26,26,26,0.65); margin-bottom: 1.6rem; font-size: 0.95rem; }

.card a.card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--charcoal);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
}

/* ---------- STORY / TWO CALLINGS ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.photo-frame {
  aspect-ratio: 4/5;
  background: var(--limestone);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.photo-frame.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.4);
  text-align: center;
  padding: 2rem;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.4;
  border-left: 3px solid var(--orange);
  padding-left: 1.8rem;
  margin: 2.5rem 0;
}

/* ---------- CALLINGS (About page) ---------- */

.callings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
}

.calling {
  padding: 3rem;
  border-right: 1px solid var(--line);
}
.calling:last-child { border-right: none; }

.calling .eyebrow { margin-bottom: 1.2rem; }
.calling h3 { font-size: 1.7rem; margin-bottom: 1rem; }
.calling p { color: rgba(26,26,26,0.68); }

/* ---------- STATS STRIP ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
}

.stat {
  padding: 2.2rem 1.5rem;
  border-right: 1px solid var(--line-on-dark);
  text-align: left;
}
.stat:last-child { border-right: none; }

.stat .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--orange);
  display: block;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "clig" 0, "hlig" 0, "swsh" 0, "salt" 0;
}

.stat .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(228,223,211,0.6);
}

/* ---------- CONTACT / CTA ---------- */

.cta-band {
  background: var(--charcoal);
  color: var(--limestone);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

.cta-band .lede {
  color: rgba(228,223,211,0.7);
  margin: 0 auto 2.2rem;
  text-align: center;
}

.cta-band .hero-ctas { justify-content: center; }

form.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 1rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

input, select, textarea {
  width: 100%;
  background: var(--charcoal-soft);
  border: 1px solid var(--line-on-dark);
  color: var(--limestone);
  font-family: var(--font-body);
  padding: 0.9rem 1rem;
  border-radius: 2px;
  font-size: 0.95rem;
}

input::placeholder, textarea::placeholder { color: rgba(228,223,211,0.4); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

textarea { min-height: 120px; resize: vertical; }

.optin-block {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.2rem 0 0.4rem;
}

.optin-block input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 0.15rem;
  accent-color: var(--orange);
  flex-shrink: 0;
}

.optin-block label {
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(228,223,211,0.6);
}

.optin-block label a {
  color: rgba(228,223,211,0.85);
  border-bottom: 1px solid var(--orange);
}

/* ---------- FOOTER ---------- */

footer {
  background: var(--charcoal);
  color: rgba(228,223,211,0.55);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--line-on-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--limestone);
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-grid a { display: block; margin-bottom: 0.6rem; font-size: 0.88rem; transition: color 0.2s; }
.footer-grid a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- IDX PLACEHOLDER ---------- */

.idx-placeholder {
  border: 1px dashed var(--line);
  background: var(--limestone-light);
  padding: 4rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(26,26,26,0.55);
}

/* ---------- IDX BROKER QUICK SEARCH WIDGET ---------- */

.IDX-quicksearchWrapper {
  width: 100% !important;
  max-width: 100% !important;
}

.IDX-quicksearchForm {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.4rem 1.2rem !important;
  width: 100% !important;
  font-family: var(--font-body) !important;
}

.IDX-qsFieldWrap {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

#IDX-qsSubmitWrap-31942 {
  grid-column: 1 / -1 !important;
  align-items: flex-start !important;
}

.IDX-qsLabel {
  font-family: var(--font-mono) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--ember) !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

.IDX-qsInput {
  width: 100% !important;
  background: var(--charcoal) !important;
  border: 1px solid var(--line) !important;
  color: var(--limestone) !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  padding: 0.85rem 1rem !important;
  border-radius: 2px !important;
  box-sizing: border-box !important;
}

.IDX-qsInput:focus {
  outline: 2px solid var(--orange) !important;
  outline-offset: 1px !important;
}

.IDX-qsButtonInput {
  background: var(--orange) !important;
  color: var(--charcoal) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  border: none !important;
  padding: 0.95rem 2.2rem !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  width: auto !important;
  min-width: 180px !important;
  transition: background 0.2s, transform 0.2s !important;
}

.IDX-qsButtonInput:hover {
  background: var(--ember) !important;
  transform: translateY(-2px) !important;
}

@media (max-width: 700px) {
  .IDX-quicksearchForm {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .callings { grid-template-columns: 1fr; }
  .calling { border-right: none; border-bottom: 1px solid var(--line); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
