/* ============================================================================
   AZ HOME FOR US — site styles
   Palette: warm Sonoran sand + the company's green, clay for accents.
   Type: Bitter (slab, headings & prices) + Hanken Grotesk (body & UI).
   ========================================================================== */

:root {
  /* color tokens (hex fallbacks first, OKLCH upgrades below) */
  --sand: #f7f3ea;
  --sand-deep: #efe9da;
  --card: #fffdf7;
  --ink: #26332a;
  --ink-soft: #55645a;
  --green: #3d672c;
  --green-deep: #27401f;
  --green-bright: #7fae5c;
  --green-tint: #e8efdf;
  --clay: #b95a2e;
  --clay-tint: #f6e5da;
  --line: #e2dac8;
  --focus: #2f6fce;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(38, 51, 42, 0.06), 0 8px 24px -12px rgba(38, 51, 42, 0.18);
  --shadow-lift: 0 2px 4px rgba(38, 51, 42, 0.08), 0 16px 32px -12px rgba(38, 51, 42, 0.24);

  --font-display: "Bitter", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Avenir Next", "Segoe UI", sans-serif;

  --space-section: clamp(3.25rem, 7vw, 5.5rem);
  --wrap: 1120px;
}

@supports (color: oklch(0.5 0.1 140)) {
  :root {
    --sand: oklch(0.965 0.014 90);
    --sand-deep: oklch(0.935 0.02 90);
    --card: oklch(0.99 0.008 95);
    --ink: oklch(0.3 0.02 150);
    --ink-soft: oklch(0.49 0.025 150);
    --green: oklch(0.46 0.105 138);
    --green-deep: oklch(0.34 0.075 140);
    --green-bright: oklch(0.71 0.12 132);
    --green-tint: oklch(0.94 0.03 130);
    --clay: oklch(0.55 0.13 45);
    --clay-tint: oklch(0.93 0.03 55);
    --line: oklch(0.88 0.02 90);
  }
}

/* ---- reset-ish ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

.section { padding: var(--space-section) 0; }
.section-kicker {
  color: var(--clay);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.section-intro { color: var(--ink-soft); max-width: 62ch; margin-top: 0.75rem; }

/* ---------------------------------------------------------------- header */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  max-width: var(--wrap);
  margin: 0 auto;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand-mark { height: 42px; width: auto; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--green-deep);
  line-height: 1.1;
}
.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.topbar-links { display: flex; align-items: center; gap: 1.1rem; }
.topbar-portal { font-weight: 700; font-size: 0.95rem; color: var(--green-deep); text-decoration: none; }
.topbar-portal:hover { text-decoration: underline; }
.lang-toggle {
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--green-tint);
  color: var(--green-deep);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-toggle:hover { background: var(--green); color: #fdfcf5; }

.nav {
  background: var(--green-deep);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: oklch(0.94 0.02 120);
  color: #ecf1e4;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 0.9rem;
}
.nav a:hover { background: rgba(255, 255, 255, 0.12); }
.nav a.nav-cta {
  background: var(--green-bright);
  color: var(--green-deep);
  font-weight: 800;
  margin-left: auto;
  padding: 0.8rem 1.2rem;
}
.nav a.nav-cta:hover { filter: brightness(1.06); }

/* phones: one compact nav row that scrolls sideways instead of stacking */
@media (max-width: 640px) {
  .topbar-inner { padding-top: 0.6rem; padding-bottom: 0.6rem; gap: 0.5rem; }
  .brand img { height: 34px; }
  .topbar-links { gap: 0.7rem; }
  .topbar-portal { font-size: 0.88rem; }
  .lang-toggle { font-size: 0.84rem; padding: 0.26rem 0.75rem; }
  .nav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 0.72rem 0.65rem; font-size: 0.92rem; }
  .nav a.nav-cta { padding: 0.72rem 0.9rem; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  background: var(--green-deep);
  color: #f2f0e4;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2rem) clamp(4.5rem, 9vw, 7rem);
  max-width: var(--wrap);
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 800;
  max-width: 18ch;
  color: #faf8ee;
}
.hero h1 em { font-style: italic; color: var(--green-bright); }
.hero p {
  margin-top: 1.1rem;
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.9vw, 1.2rem);
  line-height: 1.65;
  color: #d8dcc8;
}
.hero-actions { margin-top: 1.9rem; display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }
.hero-phone { color: #d8dcc8; font-size: 0.98rem; }
.hero-phone a { color: #faf8ee; font-weight: 700; text-decoration: none; }
.hero-roofline {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(28px, 5vw, 56px);
  display: block;
}

.hero-roofline path { fill: var(--sand); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.35rem;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), filter 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fdfcf5; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green-tint); }
.btn-light { background: #faf8ee; color: var(--green-deep); }
.btn-light:hover { filter: brightness(0.97); }
.btn-clay { background: var(--clay); color: #fdf6ef; }
.btn-clay:hover { filter: brightness(1.08); }
.btn-zillow { border-color: #006aff; color: #006aff; background: transparent; }
.btn-zillow:hover { background: #e9f1ff; }
.btn-lg { font-size: 1.08rem; padding: 0.85rem 1.6rem; }

/* ---------------------------------------------------------------- qualify band */
.qualify-band {
  background: var(--green-tint);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
}
.qualify-band h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); color: var(--green-deep); }
.qualify-intro { color: var(--ink-soft); margin-top: 0.35rem; max-width: 62ch; }
.qualify-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
}
.qualify-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 1rem 0.42rem 2.1rem;
  position: relative;
  font-weight: 600;
  font-size: 0.93rem;
}
.qualify-list li::before {
  content: "✓";
  position: absolute;
  left: 0.85rem;
  color: var(--green);
  font-weight: 800;
}
.qualify-link { margin-top: 1rem; font-weight: 700; }
.qualify-link a { text-decoration: none; color: var(--green-deep); }
.qualify-link a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- listings */
.listings-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.listings-count { color: var(--ink-soft); font-weight: 600; }

.listing-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
/* keep 3-up grids from stretching a lone card full-width */
@media (min-width: 720px) {
  .listing-grid > * { max-width: 560px; }
}

.listing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.listing-photo { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-photo a { display: block; height: 100%; }
.badge-available {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--clay);
  color: #fdf6ef;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
}
.listing-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.listing-tagline {
  color: var(--green);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
}
.listing-price { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1.2; }
.listing-price small { font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: var(--ink-soft); }
.listing-specs { font-weight: 700; font-size: 0.99rem; }
.listing-specs span { color: var(--ink-soft); font-weight: 500; }
.listing-address { color: var(--ink-soft); line-height: 1.45; }
.listing-address a { color: inherit; text-decoration: none; }
.listing-address a:hover { text-decoration: underline; }
.listing-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.chip {
  background: var(--green-tint);
  color: var(--green-deep);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
}
.listing-actions { margin-top: auto; padding-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.listing-actions .btn { flex: 1 1 auto; }
.listing-apply-line { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.5rem; }

.listings-empty {
  margin-top: 2rem;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- how it works */
.steps { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 2rem 2.5rem; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-top: 0.4rem; }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--green-bright);
  display: block;
  line-height: 1;
  margin-bottom: 0.55rem;
}
.step h3 { margin-bottom: 0.35rem; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------------------------------------------------------------- bands */
.band-mailing {
  background: var(--green-deep);
  color: #f2f0e4;
}
.band-mailing h2 { color: #faf8ee; }
.band-mailing p { color: #d8dcc8; max-width: 56ch; margin-top: 0.7rem; }

.mailing-form { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; }
.mailing-form .field { flex: 1 1 220px; }
.mailing-form .field-checks { flex: 1 1 100%; display: flex; gap: 1.4rem; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.band-mailing .field label { color: #ecf1e4; }
.band-mailing .hint { color: #b9c2ab; }
.band-mailing .mailing-note { color: #cfd6c0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  font: inherit;
  color: var(--ink);
  background: #fffef9;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
.band-mailing .check { color: #ecf1e4; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.1rem; margin-top: 1.5rem; }
.form-grid .field-full { grid-column: 1 / -1; }
.form-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.9rem; max-width: 60ch; }
.form-submit { margin-top: 1.4rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------- about + contact */
.about-band { background: var(--sand-deep); }
.about-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2.5rem; margin-top: 1.5rem; }
.about-cols p + p { margin-top: 0.9rem; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-card);
}
.contact-card h3 { margin-bottom: 0.6rem; }
.contact-line { display: block; font-size: 1.25rem; font-weight: 800; color: var(--green-deep); text-decoration: none; margin-top: 0.3rem; }
.contact-line:hover { text-decoration: underline; }
.contact-sub { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------------------------------------------------------- property page */
.prop-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2rem; align-items: start; }
@media (max-width: 860px) { .prop-layout { grid-template-columns: 1fr; } }

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--sand-deep);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(38, 51, 42, 0.55);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gallery-nav:hover { background: rgba(38, 51, 42, 0.8); }
.gallery-prev { left: 0.8rem; }
.gallery-next { right: 0.8rem; }
.gallery-count {
  position: absolute;
  bottom: 0.8rem;
  right: 0.8rem;
  background: rgba(38, 51, 42, 0.65);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.gallery-thumbs button { border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; padding: 0; cursor: pointer; background: none; aspect-ratio: 4 / 3; }
.gallery-thumbs button.active { border-color: var(--green); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.prop-facts { position: sticky; top: 4.5rem; }
@media (max-width: 860px) { .prop-facts { position: static; } }
.facts-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.6rem;
}
.facts-card .listing-price { font-size: 2.2rem; }
.facts-list { list-style: none; margin-top: 1rem; border-top: 1px solid var(--line); }
.facts-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.facts-list li span:first-child { color: var(--ink-soft); }
.facts-list li span:last-child { font-weight: 700; text-align: right; }
.facts-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.25rem; }
.facts-fee-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.9rem; }

.prop-desc { margin-top: 2.25rem; max-width: 70ch; }
.prop-desc h2 { margin-bottom: 0.8rem; }
.prop-desc p + p { margin-top: 0.95rem; }

.prop-map { margin-top: 2.25rem; }
.prop-map h2 { margin-bottom: 0.8rem; }
.prop-map iframe {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--sand-deep);
}

.tour-panel {
  margin-top: 2.5rem;
  background: var(--green-tint);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.tour-panel h2 { color: var(--green-deep); }
.tour-panel .form-note a { color: var(--green-deep); }

.back-link { display: inline-block; margin-top: 1.5rem; font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- apply page */
.req-list { margin-top: 1.25rem; list-style: none; max-width: 62ch; }
.req-list li { padding: 0.7rem 0 0.7rem 2.1rem; position: relative; border-bottom: 1px solid var(--line); }
.req-list li::before {
  content: "✓";
  position: absolute;
  left: 0.15rem;
  top: 0.62rem;
  color: var(--green);
  font-weight: 800;
  font-size: 1.15rem;
}
.apply-prop-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; max-width: 640px; }
.apply-prop {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.apply-prop strong { font-family: var(--font-display); font-size: 1.08rem; }
.apply-prop span { display: block; color: var(--ink-soft); font-size: 0.92rem; }
.apply-prop-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--green-deep); color: #cfd6c0; padding: 3.25rem 0 2.25rem; }
.footer a { color: #ecf1e4; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 2rem; }
.footer h3 { color: #faf8ee; font-size: 1.05rem; margin-bottom: 0.7rem; }
.footer ul { list-style: none; }
.footer li { margin: 0.4rem 0; }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #faf8ee; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.eho { display: flex; align-items: center; gap: 0.5rem; }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- page hero (inner pages) */
.page-head { background: var(--sand-deep); padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; color: var(--green-deep); }
.page-head p { color: var(--ink-soft); margin-top: 0.6rem; max-width: 62ch; }

.thanks-panel { max-width: 640px; margin: clamp(3rem, 8vw, 5rem) auto; text-align: center; padding: 0 1.25rem; }
.thanks-panel h1 { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--green-deep); }
.thanks-panel p { margin-top: 1rem; color: var(--ink-soft); }
.thanks-panel .btn { margin-top: 1.75rem; }
