/* Cowtown Realty — site styles */

:root {
  --ink: #111315;
  --ink-2: #1B1E21;
  --ink-3: #24282C;
  --paper: #FBFAF7;
  --stone: #F2EEE6;
  --line: #E6E1D7;
  --line-2: #D9D2C5;
  --text: #3A3732;
  --muted: #5E5A53;
  --bronze: #7A5C33;      /* accent on light grounds (AA) */
  --champagne: #C9A46A;   /* accent on dark grounds */
  --cream: #E8D9BC;
  --on-dark: #D9D2C5;
  --on-dark-muted: #A6A097;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1280px;
  --gutter: 32px;
  --section: 128px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; color: inherit; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 880px; }

/* ---------- Type helpers ---------- */

.eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 400;
  margin-bottom: 18px;
}
.on-dark .eyebrow { color: var(--champagne); }

.display { font-size: clamp(40px, 5vw, 56px); line-height: 1.08; }
.display-xl { font-size: clamp(46px, 7vw, 96px); line-height: 1.02; }
.display em, .display-xl em { font-style: italic; color: var(--cream); }

.lead { font-size: 19px; line-height: 1.75; color: var(--text); }
.on-dark .lead { color: var(--on-dark); }

.prose { font-size: 18px; line-height: 1.8; color: var(--text); }
.prose h2 { font-size: 36px; margin: 56px 0 18px; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 26px; font-weight: 500; margin: 36px 0 12px; color: var(--ink); }
.prose ul { padding: 0; margin: 0 0 1.4em; list-style: none; }
.prose li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.prose li::before {
  content: ''; position: absolute; left: 0; top: 0.85em;
  width: 16px; height: 1px; background: var(--bronze);
}
.prose strong { font-weight: 500; color: var(--ink); }

.text-link {
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bronze); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 4px;
  display: inline-block;
}
.text-link:hover { color: var(--ink); }
.on-dark .text-link { color: var(--champagne); }
.on-dark .text-link:hover { color: var(--paper); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 16px 34px;
  font-family: var(--sans); font-size: 14px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--bronze); color: var(--paper); }
.btn--gold { background: var(--champagne); color: var(--ink); font-weight: 500; }
.btn--gold:hover { background: var(--cream); color: var(--ink); }
.btn--ghost { border-color: var(--on-dark); color: var(--paper); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Top bar & header ---------- */

.topbar { background: var(--ink); color: var(--on-dark); font-size: 13px; letter-spacing: 0.08em; }
.topbar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 10px; padding-bottom: 10px; }
.topbar a { color: var(--cream); text-decoration: none; }
.topbar a:hover { color: var(--paper); }
.topbar__contact { display: flex; gap: 24px; flex-wrap: wrap; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 20px; }

.wordmark { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark:hover { color: var(--ink); }
.wordmark__name { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: 0.14em; }
.wordmark__sub { font-size: 11px; letter-spacing: 0.5em; color: var(--bronze); padding-left: 2px; }
.wordmark--light, .wordmark--light:hover { color: var(--paper); }
.wordmark--light .wordmark__sub { color: var(--champagne); }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none;
  font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 0; border-bottom: 1px solid transparent;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--bronze); color: var(--ink); }
.site-nav__cta { min-height: 46px; padding: 12px 24px; }

.nav-toggle {
  display: none; align-items: center; gap: 12px;
  background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer;
  font: inherit; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 24px; height: 1px; background: var(--ink); position: relative; content: '';
}
.nav-toggle__bars::before { position: absolute; top: -7px; }
.nav-toggle__bars::after  { position: absolute; top: 7px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--bronze); }
  .site-nav__cta { margin-top: 20px; }
}

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section--stone { background: var(--stone); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--tight { padding: 88px 0; }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.section-head__text { max-width: 760px; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 80px; align-items: center; }
.split--top { align-items: start; }

/* ---------- Hero ---------- */

.hero {
  position: relative; background: var(--ink-2); color: var(--paper);
  min-height: 760px; display: flex; align-items: flex-end; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,19,21,.15) 0%, rgba(17,19,21,.35) 45%, rgba(17,19,21,.85) 100%);
}
.hero--plain { background: var(--ink-2); }
.hero--plain::before {
  content: ''; position: absolute; right: -12%; top: -20%; width: 70%; aspect-ratio: 1;
  border: 1px solid rgba(201,164,106,.18); border-radius: 50%;
}
.hero--plain::after {
  content: ''; position: absolute; right: -2%; top: -6%; width: 46%; aspect-ratio: 1;
  border: 1px solid rgba(201,164,106,.12); border-radius: 50%;
}
.hero__content { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 96px; }
.hero__content > * + * { margin-top: 28px; }
.hero h1 { max-width: 920px; }
.hero .lead { max-width: 620px; }

/* Inner-page hero */
.page-hero { background: var(--ink); color: var(--paper); padding: 120px 0 96px; position: relative; overflow: hidden; }
.page-hero::after {
  content: ''; position: absolute; right: -10%; top: -60%; width: 46%; aspect-ratio: 1;
  border: 1px solid rgba(201,164,106,.16); border-radius: 50%;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 900px; }
.page-hero .lead { max-width: 680px; margin-top: 24px; }

/* ---------- Search strip ---------- */

.search-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.search-strip__form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px 24px; align-items: end; padding-top: 28px; padding-bottom: 28px;
}
.search-strip__more { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin: 0; }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 300;
  color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 12px 0; min-height: 48px; width: 100%;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--bronze); }
.field--full { grid-column: 1 / -1; }

/* ---------- Cards & tiles ---------- */

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); border-top: 1px solid var(--line-2); }
.service { padding: 40px 32px 40px 0; border-right: 1px solid var(--line); }
.service + .service { padding-left: 32px; }
.service:last-child { border-right: 0; }
.service__num { font-family: var(--serif); font-size: 22px; color: var(--bronze); }
.service h3 { font-size: 30px; font-weight: 500; margin: 14px 0 14px; }
.service p { color: var(--text); font-size: 17px; line-height: 1.75; }
.service a { text-decoration: none; color: inherit; }
@media (max-width: 1100px) {
  .service, .service + .service { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 260px; padding: 28px; overflow: hidden;
  background: var(--ink-3); color: var(--paper); text-decoration: none;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,19,21,0) 35%, rgba(17,19,21,.82) 100%); }
.tile:hover img { transform: scale(1.04); }
.tile:hover { color: var(--paper); }
.tile__text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.tile__name { font-family: var(--serif); font-size: 32px; line-height: 1.1; }
.tile__area { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--champagne); }
.tile__arrow { position: absolute; top: 24px; right: 24px; z-index: 1; color: var(--champagne); }

.panel { background: var(--stone); padding: 48px; }
.panel--dark { background: var(--ink); color: var(--paper); }
.panel h3 { font-size: 30px; font-weight: 500; margin-bottom: 16px; }

.figure-block {
  position: relative; aspect-ratio: 5 / 4; background: var(--ink-2); overflow: hidden;
  display: flex; align-items: flex-end; padding: 40px; color: var(--paper);
}
.figure-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.figure-block__quote { position: relative; z-index: 1; font-family: var(--serif); font-size: 34px; line-height: 1.25; font-style: italic; max-width: 440px; }
.figure-block__quote span { display: block; margin-top: 18px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--champagne); }
.figure-block--plain::before {
  content: ''; position: absolute; left: -20%; bottom: -40%; width: 90%; aspect-ratio: 1;
  border: 1px solid rgba(201,164,106,.2); border-radius: 50%;
}

.stat-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.stat-list li { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--text); }
.stat-list strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.on-dark .stat-list { border-top-color: var(--ink-3); }
.on-dark .stat-list li { border-bottom-color: var(--ink-3); color: var(--on-dark); }
.on-dark .stat-list strong { color: var(--paper); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--text); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--serif); font-size: 24px; color: var(--bronze); line-height: 1.4; }

/* ---------- CTA band ---------- */

.cta-band { text-align: center; }
.cta-band .container > * + * { margin-top: 28px; }
.cta-band h2 { max-width: 800px; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-note { font-size: 14px; color: var(--muted); margin: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 20px 24px; margin-bottom: 32px; font-size: 16px; border-left: 0; }
.notice--ok { background: #EAF1E6; color: #24401A; }
.notice--error { background: #F6E4E0; color: #6B2216; }

/* ---------- IDX embeds ---------- */

.idx-embed { min-height: 240px; }
.idx-embed iframe { width: 100% !important; border: 0; }
.idx-embed--map iframe { min-height: 75vh; }
.idx-embed .IDX-showcaseTable, .idx-embed .IDX-results { font-family: var(--sans) !important; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--on-dark-muted); font-size: 15px; line-height: 1.8; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--champagne); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 48px; padding-top: 88px; padding-bottom: 48px; }
.site-footer__brand p { margin-top: 20px; max-width: 280px; }
.site-footer__title { font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--paper); margin-bottom: 16px; line-height: 1.4; }
.site-footer__links { list-style: none; padding: 0; margin: 0; }
.site-footer__links li { margin-bottom: 6px; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--ink-3); font-size: 13px; }
@media (max-width: 1100px) { .site-footer__grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  :root { --gutter: 20px; --section: 88px; }
  body { font-size: 16px; }
  .topbar__inner > span:first-child { display: none; }
  .hero { min-height: 620px; }
  .tile { min-height: 180px; }
  .hero__content { padding-top: 96px; padding-bottom: 64px; }
  .page-hero { padding: 88px 0 64px; }
  .split { gap: 48px; }
  .panel { padding: 32px 24px; }
  .figure-block { padding: 28px; }
  .figure-block__quote { font-size: 28px; }
  .btn { width: 100%; }
  .site-nav__cta { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img { transition: none; }
}

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

.lead-form { scroll-margin-top: 120px; }
.lead-form--dark .field { color: var(--on-dark-muted); }
.lead-form--dark .field input,
.lead-form--dark .field select,
.lead-form--dark .field textarea { color: var(--paper); border-bottom-color: var(--on-dark); }
.lead-form--dark .field select { background-image: linear-gradient(45deg, transparent 50%, var(--paper) 50%), linear-gradient(135deg, var(--paper) 50%, transparent 50%); }
.lead-form--dark .field select option { color: var(--ink); }
.lead-form--dark .field input:focus,
.lead-form--dark .field select:focus,
.lead-form--dark .field textarea:focus { border-bottom-color: var(--champagne); }
.lead-form--dark .form-note { color: var(--on-dark-muted); }
.lead-form--dark .notice a { color: inherit; }

/* ---------- FAQ ---------- */

.faq__list { border-top: 1px solid var(--line-2); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 24px 48px 24px 0; min-height: 44px;
  font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ''; position: absolute; right: 8px; top: 50%; margin-top: -9px; width: 10px; height: 10px;
  border-right: 1px solid var(--bronze); border-bottom: 1px solid var(--bronze);
  transform: rotate(45deg); transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq__item p { margin: 0 0 24px; font-size: 17px; line-height: 1.8; color: var(--text); max-width: 680px; }

/* ---------- Listings (from IDX feed) ---------- */

.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 32px; }
.listing { display: flex; flex-direction: column; }
.listing__link { display: flex; flex-direction: column; gap: 20px; color: var(--ink); text-decoration: none; }
.listing__link:hover { color: var(--ink); }
.listing__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); }
.listing__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; color: transparent; }
.listing__link:hover .listing__media img { transform: scale(1.04); }
.listing__badge {
  position: absolute; top: 16px; left: 16px; padding: 6px 12px;
  background: var(--paper); color: var(--ink);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
}
.listing__body { display: flex; flex-direction: column; gap: 6px; }
.listing__area { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bronze); }
.listing__address { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0; }
.listing__link:hover .listing__address { color: var(--bronze); }
.listing__specs { font-size: 15px; color: var(--muted); letter-spacing: 0.03em; }
.listing__price { font-size: 19px; font-weight: 400; margin-top: 4px; }
.listing__courtesy { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.listings-count { margin: 0 0 32px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.idx-disclaimer { display: flex; gap: 16px; align-items: flex-start; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.idx-disclaimer img { flex: 0 0 auto; width: 60px; height: auto; opacity: .8; color: transparent; font-size: 0; }
.idx-disclaimer p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ---------- Featured residence (single listing, home page) ---------- */

.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.feature__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; color: transparent; }
.feature__media:hover img { transform: scale(1.03); }
.feature__body { display: flex; flex-direction: column; gap: 12px; }
.feature__address { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.4vw, 46px); line-height: 1.1; margin: 4px 0 0; }
.feature__address a { color: var(--ink); text-decoration: none; }
.feature__address a:hover { color: var(--bronze); }
.feature__price { font-size: 24px; font-weight: 400; letter-spacing: 0.02em; }
.feature__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0; margin: 16px 0 8px; border-top: 1px solid var(--line-2); }
.feature__facts div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line-2); }
.feature__facts dt { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.feature__facts dd { margin: 4px 0 0; font-family: var(--serif); font-size: 22px; color: var(--ink); white-space: nowrap; }
.feature__remarks { font-size: 17px; line-height: 1.8; color: var(--text); margin: 8px 0 12px; }
@media (max-width: 960px) { .feature { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 720px) { .feature__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
