/* ============================================================
   Base — Reset + Typography + Primitives
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-light);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, iframe, svg { display: block; max-width: 100%; height: auto; }
iframe { border: 0; }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary); }

button {
  font: inherit; cursor: pointer; background: none; border: none; padding: 0;
}

ul, ol { padding: 0; margin: 0; list-style: none; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  color: var(--c-heading);
  line-height: var(--lh-tight);
}

h1 { font-size: var(--text-3xl); text-transform: uppercase; line-height: 1.5; }
h2 { font-size: var(--text-2xl); text-transform: uppercase; letter-spacing: var(--ls-wide); }
h3 { font-size: var(--text-xl); }

/* ---- Layout primitives ---- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--container-padding) * 2);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-block: var(--space-9);
}
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-primary); color: var(--c-text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--c-text-on-dark); }

.section-eyebrow {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-primary);
  margin: 0 0 var(--space-3);
  display: block;
}

.section-header { margin-bottom: var(--space-7); }
.section-header--center { text-align: center; }
.section-header h2 { margin-bottom: var(--space-3); }
.section-header p { color: var(--c-text-soft); max-width: 56ch; margin-inline: auto; }

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

.btn {
  display: inline-block;
  max-width: 100%;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 20px;   /* prod buttons = 20px */
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  border: 2px solid var(--c-primary);
  background: var(--c-primary);
  color: var(--c-text-on-dark) !important;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}
.btn:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }

.btn--outline {
  background: transparent;
  color: var(--c-primary) !important;
}
.btn--outline:hover { background: var(--c-primary); color: var(--c-text-on-dark) !important; }

.btn--on-dark {
  border-color: var(--c-text-on-dark);
  background: transparent;
  color: var(--c-text-on-dark) !important;
}
.btn--on-dark:hover { background: var(--c-text-on-dark); color: var(--c-primary) !important; }

/* outline button on a dark panel — white border+text everywhere (was only scoped to city cards,
   so the MLS-CTA "Map search" button rendered navy-on-charcoal = invisible) */
.btn--outline.on-dark {
  border-color: var(--c-text-on-dark);
  color: var(--c-text-on-dark) !important;
  background: transparent;
}
.btn--outline.on-dark:hover { background: var(--c-text-on-dark); color: var(--c-primary) !important; }

/* ---- Utility ---- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.hide-sm { display: block; }
.show-sm { display: none; }

@media (max-width: 768px) {
  .hide-sm { display: none; }
  .show-sm { display: block; }
  .section { padding-block: var(--space-7); }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-xl); }
}

/* ---- Parallax media layer ----

   Prod scrolls its photos at half speed: the layer's viewport-top always sits
   at containerTop / 2, so main.js sets translateY = -containerTop / 2. Sizing
   the layer to (containerHeight + viewportHeight) / 2 gives it exactly enough
   slack to cover the container at every scroll position — no gap at either
   edge. Prod uses no background-attachment: fixed anywhere.

   Used by the home hero, the city-card photos, the MLS band, and every
   inner-page banner, so it lives here rather than in home.css. Any scrim must
   stay pinned to the container, not ride along on the layer. */
[data-parallax] {
  position: relative;
  overflow: hidden;
}
.parallax__layer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(50% + 50vh);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  /* main.js never applies a transform; collapse the slack so nothing shifts. */
  .parallax__layer { height: 100%; }
}
