/* Cimarron Properties. Fresh build, editorial calm on plaster. */

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  margin: 0 0 var(--s-2);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-hero); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }

p { margin: 0 0 var(--s-2); max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--agave); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t-fast) var(--ease); }
a:not(.btn):not(.skip-link):hover { color: var(--agave-deep); }

::selection { background: var(--agave); color: var(--plaster); }

html { scrollbar-color: #C9BFAE var(--shade); scrollbar-width: thin; }
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--shade); }
body::-webkit-scrollbar-thumb { background: #C9BFAE; border-radius: 5px; }

:focus-visible { outline: 2px solid var(--agave); outline-offset: 2px; border-radius: 2px; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--agave); color: #fff; padding: 10px 16px;
  border-radius: var(--r-btn); font-weight: 700; text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:hover, .skip-link:focus-visible { top: 12px; color: #fff; }
.skip-link:hover:not(:focus-visible) { top: -60px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242, 236, 226, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 26px; height: 26px; flex: none; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  padding: 10px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--agave-deep); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--agave); color: var(--agave-deep); }
.site-nav .btn { padding: 10px 18px; border-bottom: none; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--hairline); border-radius: var(--r-btn);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 700; font-size: 0.9375rem;
  padding: 13px 22px; border-radius: var(--r-btn); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; min-height: 44px;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-fill { background: var(--agave); color: #fff; }
.btn-fill:hover { background: var(--agave-deep); color: #fff; }

.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--plaster); }

.btn-dusk { background: transparent; color: var(--dusk-text); border-color: var(--dusk-text); }
.btn-dusk:hover { background: var(--dusk-text); color: var(--dusk); }

/* ---------- hero ---------- */

.hero { padding: var(--s-8) 0 var(--s-12); }
.hero .wrap {
  display: grid; grid-template-columns: 1.12fr 0.88fr;
  gap: var(--s-8); align-items: center;
}
.hero-copy .lede { font-size: 1.125rem; color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }

.hero-figure { margin: 0; }
.photo-card {
  border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-lift); }
.hero-figure .photo-card { aspect-ratio: 4 / 5; max-height: 540px; }
.hero-figure figcaption {
  margin-top: var(--s-2); font-size: var(--fs-fine); color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.hero-figure figcaption svg { width: 15px; height: 15px; color: var(--agave); flex: none; }

.js .fade-set { opacity: 0; transform: translateY(14px); }

/* ---------- sections ---------- */

.section { padding: var(--s-12) 0; }
.section-head { max-width: 56ch; margin-bottom: var(--s-6); }
.section-head p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.split .photo-card { aspect-ratio: 4 / 3; }
.split .photo-card.tall { aspect-ratio: 4 / 5; max-height: 500px; }

/* ---------- dusk band (owners) ---------- */

.dusk-band { background: var(--dusk); color: var(--dusk-text); }
.dusk-band h2, .dusk-band h3 { color: var(--dusk-text); }
.dusk-band p { color: var(--dusk-muted); }
.dusk-band a:not(.btn) { color: var(--dusk-accent); }
.dusk-band a:not(.btn):hover { color: var(--dusk-text); }
.dusk-band ::selection { background: var(--dusk-accent); color: var(--dusk); }

.svc-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.svc-list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.svc-list svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--dusk-accent); }
.svc-list strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; }
.svc-list span { color: var(--dusk-muted); font-size: var(--fs-small); }

.on-plaster .svc-list svg { color: var(--agave); }
.on-plaster .svc-list span { color: var(--muted); }

/* ---------- monthly loop signature ---------- */

.loop-section { background: var(--shade); }
.loop-flow { position: relative; max-width: 620px; margin: 0 auto; padding-left: 56px; }
.loop-rail { position: absolute; left: 4px; top: 8px; height: calc(100% - 16px); width: 28px; }
.loop-rail path { stroke: var(--agave); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.loop-rail .rail-base { stroke: var(--hairline); }
.loop-rail .rail-draw { transition: stroke-dashoffset 700ms var(--ease); }
.loop-step { position: relative; padding: 0 0 var(--s-6); }
.loop-step:last-child { padding-bottom: 0; }
.loop-node {
  position: absolute; left: -49px; top: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--shade); border: 2.5px solid var(--hairline);
  transition: border-color 400ms var(--ease), background-color 400ms var(--ease), transform 400ms var(--ease);
}
.loop-step.lit .loop-node { border-color: var(--agave); background: var(--agave); transform: scale(1.08); }
.loop-node::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--plaster); opacity: 0; transition: opacity 400ms var(--ease);
}
.loop-step.lit .loop-node::after { opacity: 1; }
.loop-step h3 { margin-bottom: 4px; transition: color 400ms var(--ease); }
.loop-step p { color: var(--muted); font-size: var(--fs-small); max-width: 52ch; }
.loop-step .when { color: var(--copper); font-size: var(--fs-fine); font-weight: 700; }
.loop-close { margin-top: var(--s-6); padding-left: 56px; }
.loop-close p { color: var(--muted); font-size: var(--fs-small); }

/* ---------- coverage ---------- */

.coverage-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--s-6); align-items: start; }
#map {
  height: 460px; border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--card-shadow); background: var(--shade);
  border: 1px solid var(--hairline);
}
.minutes { margin: 0; }
.minutes dl { margin: 0; }
.minutes .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2);
  padding: 11px 2px; border-bottom: 1px solid var(--hairline);
}
.minutes .row:first-child { border-top: 1px solid var(--hairline); }
.minutes dt { font-weight: 500; }
.minutes dd { margin: 0; color: var(--agave-deep); font-weight: 700; white-space: nowrap; }
.minutes-note { margin-top: var(--s-2); font-size: var(--fs-fine); color: var(--muted); }

.map-marker { background: none; border: none; }
.map-marker .pin {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--agave); border: 2.5px solid var(--plaster);
  box-shadow: 0 1px 4px rgba(43, 38, 32, 0.4);
}
.map-marker.office .pin { width: 18px; height: 18px; background: var(--copper); }
.leaflet-popup-content-wrapper { border-radius: 10px; font-family: var(--body); }

/* ---------- about ---------- */

.fact-row {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6);
  margin: var(--s-4) 0; padding: var(--s-3) 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.fact-row div { min-width: 120px; }
.fact-row .fact-n { font-family: var(--display); font-weight: 700; font-size: 1.375rem; display: block; }
.fact-row .fact-l { color: var(--muted); font-size: var(--fs-small); }

/* ---------- contact band ---------- */

.contact-band { background: var(--shade); }
.contact-band .wrap { display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center; }
.phone-big {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.phone-big:hover { color: var(--agave-deep); }
.contact-band .sub { color: var(--muted); margin-top: 4px; }

/* ---------- contact page ---------- */

.contact-cols { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--s-8); align-items: start; }
.contact-info address { font-style: normal; margin-bottom: var(--s-3); }
.contact-lines { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: 6px; }
.contact-lines li { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.contact-lines svg { width: 18px; height: 18px; color: var(--agave); flex: none; }
.contact-lines a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- forms ---------- */

.form-card {
  background: #FAF7F0; border: 1px solid var(--hairline); border-radius: var(--r-card);
  padding: var(--s-4); box-shadow: var(--card-shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: var(--fs-small); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #CFC5B4; border-radius: var(--r-btn);
  padding: 11px 12px; min-height: 44px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--agave); box-shadow: 0 0 0 3px rgba(52, 96, 74, 0.18);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: var(--fs-fine); color: var(--muted); margin-top: var(--s-2); }
.form-status { display: none; margin-top: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-btn); font-size: var(--fs-small); }
.form-status.show { display: block; }
.form-status.ok { background: rgba(52, 96, 74, 0.12); color: var(--agave-deep); }
.form-status.err { background: rgba(143, 78, 34, 0.12); color: var(--copper); }
.form-status a { font-weight: 700; }

/* ---------- footer ---------- */

.site-footer { background: var(--dusk); color: var(--dusk-muted); padding: var(--s-8) 0 var(--s-6); }
.site-footer a { color: var(--dusk-text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--dusk-accent); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-6); }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--dusk-text); display: flex; align-items: center; gap: 10px; }
.footer-brand svg { width: 22px; height: 22px; }
.footer-grid h3 { font-size: var(--fs-small); font-weight: 600; color: var(--dusk-accent); margin-bottom: var(--s-2); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-note { margin-top: var(--s-6); padding-top: var(--s-3); border-top: 1px solid rgba(239, 233, 220, 0.14); font-size: var(--fs-fine); }
.footer-note p { max-width: none; }

/* ---------- mobile sticky bar ---------- */

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(38, 49, 43, 0.97); border-top: 1px solid rgba(239, 233, 220, 0.16);
  transform: translateY(0); transition: transform var(--t-med) var(--ease);
}
.sticky-bar.hidden { transform: translateY(110%); }
.sticky-bar .btn { flex: 1; padding: 12px 10px; font-size: 0.9rem; white-space: nowrap; }
.sticky-bar .btn-line { color: var(--dusk-text); border-color: var(--dusk-text); }
.sticky-bar .btn-line:hover { background: var(--dusk-text); color: var(--dusk); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: var(--s-6) 0 var(--s-8); }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero-figure { max-width: 460px; }
  .split, .coverage-grid, .contact-cols { grid-template-columns: 1fr; gap: var(--s-6); }
  .section { padding: var(--s-8) 0; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .contact-band .wrap { grid-template-columns: 1fr; }

  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--plaster); border-bottom: 1px solid var(--hairline);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-3);
    box-shadow: 0 16px 24px rgba(43, 38, 32, 0.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 4px; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--hairline); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--hairline); color: var(--agave-deep); }
  .site-nav .btn { margin-top: var(--s-2); justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .sticky-bar { display: flex; }
  body { padding-bottom: 76px; }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 100%; }
  #map { height: 340px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .fade-set { opacity: 1; transform: none; }
  .loop-step .loop-node { border-color: var(--agave); background: var(--agave); }
  .loop-step .loop-node::after { opacity: 1; }
  .loop-rail .rail-draw { stroke-dashoffset: 0 !important; }
}
