/* ================================================================
   Wyatt Miller Real Estate — site styles
   Tokens live in /brand/tokens.css. This file consumes them.
   Fallback values are declared below so the site still renders
   if tokens.css fails to load.
   Breakpoints: 768px (tablet), 1024px (desktop).
   ================================================================ */

:root {
  /* Safety-net fallbacks — tokens.css will override */
  --ink:       #1C1917;
  --clay:      #B5532A;
  --clay-deep: #8A3E20;
  --sand:      #F5EEE4;
  --bone:      #FAF7F2;
  --taupe:     #7A6A5A;
  --dust:      #E4D9C8;
  --cream:     #FFFCF7;

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter',  system-ui, sans-serif;
  --font-accent:  'Fraunces', Georgia, serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --container-max: 1200px;

  /* Nav height (used for scroll offset on anchors) */
  --nav-h: 76px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { overflow-x: hidden; }

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

/* Section rhythm */
.section {
  padding-block: 48px;
}
.section-alt { background: var(--bone); }

/* Section with a photo background — same treatment as the hero banner:
   image filtered for consistent exposure, then a dark gradient overlay so
   text stays legible. */
.section-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--cream);
}
.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('../images/body-1.jpg') center/cover no-repeat;
  filter: brightness(0.62) saturate(1.10) contrast(1.02);
}
.section-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(28,25,23,.72) 0%,
    rgba(28,25,23,.58) 50%,
    rgba(28,25,23,.75) 100%
  );
}
.section-photo h2,
.section-photo h3 { color: var(--cream); }
.section-photo .section-lede,
.section-photo .process-step p { color: var(--cream); opacity: 0.9; }
.section-photo .eyebrow { color: var(--clay); opacity: 0.95; }
@media (min-width: 768px)  { .section { padding-block: 64px; } }
@media (min-width: 1024px) { .section { padding-block: 96px; } }

.section-head {
  margin-bottom: 48px;
}
.section-lede {
  font-size: 1.0625rem;
  color: var(--taupe);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--clay);
  color: var(--cream);
}
.btn-primary:hover { background: var(--clay-deep); color: var(--cream); }

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

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

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bone);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-nav.is-scrolled {
  box-shadow: 0 1px 0 rgba(28,25,23,.05), 0 6px 18px rgba(28,25,23,.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 52px; width: auto; display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-menu a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav-menu a:hover { color: var(--clay); text-decoration: none; }

/* External link to HomeSmart IDX — styled as a small clay pill so it reads
   as a primary action in the nav, not just another text link. Margin-left
   auto pushes it to the right edge, separating it from the text links. */
.nav-listings {
  background: var(--clay);
  color: var(--cream) !important;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  white-space: nowrap;
  margin-left: 16px;
  transition: background .15s ease;
}
.nav-listings:hover {
  background: var(--clay-deep);
  color: var(--cream) !important;
}
@media (max-width: 899px) {
  .nav-listings {
    align-self: flex-start;
    margin-top: 12px;
  }
}

/* Persistent phone — visible at every breakpoint, always tappable. */
.nav-phone-persistent {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  margin-left: auto;
  margin-right: 12px;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav-phone-persistent:hover {
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}
@media (max-width: 520px) {
  .nav-phone-persistent {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bone);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 24px;
    box-shadow: 0 10px 24px rgba(28,25,23,.08);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .25s ease, padding .25s ease, visibility 0s linear .25s;
  }
  .nav-menu.is-open {
    max-height: 500px;
    padding: 8px 24px 24px;
    visibility: visible;
    transition: max-height .25s ease, padding .25s ease, visibility 0s linear 0s;
  }
  .nav-menu a {
    padding: 14px 0;
    border-bottom: 1px solid var(--dust);
    font-size: 1rem;
  }
  .nav-menu a:last-child { border-bottom: 0; }
  .nav-phone {
    margin-top: 12px;
    border: 1.5px solid var(--ink);
    text-align: center;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 1024px) { .hero { min-height: 82vh; } }

.hero-slides {
  position: absolute; inset: 0; z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Base filter for all slides; per-slide overrides below balance exposure. */
  filter: brightness(0.72) saturate(1.08) contrast(1.02);
}

/* Per-slide exposure normalization so all three read at similar brightness
   behind white text. Slide 1 (bright aerial) darkens most; slide 3 (sunset)
   stays closer to its native exposure. */
.hero-slide:nth-child(1) img { filter: brightness(0.60) saturate(1.10) contrast(1.02); }
.hero-slide:nth-child(2) img { filter: brightness(0.68) saturate(1.15) contrast(1.04); }
.hero-slide:nth-child(3) img { filter: brightness(0.85) saturate(1.10) contrast(1.02); }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to top,
    rgba(28,25,23,.72) 0%,
    rgba(28,25,23,.55) 45%,
    rgba(28,25,23,.30) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 64px 96px;
  max-width: 820px;
}
.hero-eyebrow { color: var(--cream); opacity: .95; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--cream);
  font-size: clamp(2rem, 4.6vw, var(--text-display));
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--cream);
  max-width: 56ch;
  margin-bottom: 28px;
  opacity: .92;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,252,247,.45);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hero-dot:hover { background: rgba(255,252,247,.75); }
.hero-dot.is-active { background: var(--cream); transform: scale(1.2); }

/* ============================================================
   WHO I WORK WITH
   ============================================================ */
.who-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px)  { .who-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.who-card {
  background: var(--bone);
  border: 1px solid var(--dust);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.who-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(28,25,23,.08);
  border-color: var(--clay);
}
.who-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: rgba(181,83,42,.1);
  color: var(--clay);
  margin-bottom: 20px;
}
.who-card h3 { margin-bottom: 12px; }
.who-card p {
  color: var(--taupe);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 1024px) {
  .exp-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 36px;
  padding: 24px;
  background: var(--sand);
  border-radius: var(--radius-md);
  border: 1px solid var(--dust);
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; gap: 20px; }
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-size: 0.75rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--clay);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.exp-left p {
  color: var(--taupe);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 62ch;
}


/* Map */
.map-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(28,25,23,.2);
  background: #0a0a0a;
}
#closings-map {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: #0a0a0a;
}
@media (max-width: 520px) {
  #closings-map { aspect-ratio: 1 / 1; }
}
.map-caption {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 500;
  background: rgba(28,25,23,.75);
  color: var(--cream);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  pointer-events: none;
  max-width: calc(100% - 24px);
}

/* Custom map pin */
.closing-pin {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 4px rgba(181,83,42,.25), 0 0 0 1px rgba(0,0,0,.25);
  transform: translate(-7px, -7px);
  cursor: pointer;
}
.closing-pin:hover { background: var(--clay-deep); }

/* Leaflet popup override — match brand */
.leaflet-popup-content-wrapper {
  background: var(--bone);
  color: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.leaflet-popup-tip { background: var(--bone); }
.leaflet-popup-content {
  margin: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.leaflet-popup-content .pop-addr {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.leaflet-popup-content .pop-meta {
  color: var(--taupe);
  font-size: 0.75rem;
}
.leaflet-popup-content .pop-price {
  color: var(--clay);
  font-weight: 600;
}
.leaflet-control-attribution {
  background: rgba(28,25,23,.7) !important;
  color: var(--cream) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--cream) !important; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 0.7fr 2fr; gap: 48px; }
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 0.6fr 2.2fr; gap: 56px; }
}

.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(28,25,23,.08);
}
@media (min-width: 768px) {
  .about-photo {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
  }
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}
.about-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--taupe);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.25rem;
  z-index: 1;
}
.about-copy p {
  color: var(--taupe);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 72ch;
}
.about-copy p:last-child {
  color: var(--ink);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.5;
  margin-top: 20px;
}

/* ============================================================
   CTA strip
   ============================================================ */
.cta-strip {
  background: #2E1F17;
  color: var(--cream);
  padding-block: 56px;
}
@media (min-width: 1024px) { .cta-strip { padding-block: 80px; } }
.cta-strip h2, .cta-strip .eyebrow { color: var(--cream); }
.cta-strip .eyebrow { color: var(--sand); opacity: .85; }
.cta-strip h2 { color: var(--cream); max-width: 20ch; }
.cta-sub { color: var(--dust); margin: 0; max-width: 44ch; }

.cta-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 768px) {
  .cta-inner { grid-template-columns: 1.4fr auto; gap: 32px; }
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-strip .btn-outline-ink {
  color: var(--cream);
  border-color: var(--cream);
}
.cta-strip .btn-outline-ink:hover {
  background: var(--cream);
  color: var(--ink);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
}
.footer-logo {
  height: 56px;
  width: auto;
  margin-bottom: 16px;
  /* Footer uses logo-footer.svg (horizontal lockup with cream wordmark, clay
     AZ mark, taupe sub-line) — no filter needed, colors baked into the SVG. */
}
.footer-tag {
  color: var(--dust);
  font-size: 0.9375rem;
  max-width: 40ch;
  margin-bottom: 12px;
}
.footer-brokerage {
  color: var(--cream);
  opacity: 0.85;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.footer-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--dust);
}
.affil {
  display: inline-flex;
  align-items: center;
  color: var(--dust);
}
.affil svg { display: block; }
/* Fair Housing / REALTOR / HomeSmart logos come in as black-on-white PNGs.
   invert(1) flips them to white-on-black, then mix-blend-mode: screen lets
   the black (former-white) background blend with the dark footer, leaving
   only the white mark visible. */
.affil img {
  height: 36px;
  width: auto;
  display: block;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.85;
}
/* HomeSmart has a red mark + black text; plain invert turns red→cyan.
   grayscale drops it to gray, then invert+brightness pushes both the red-path
   and black-path to white, while the white bg still ends up black and blends
   via screen. */
.affil-hs img {
  height: 26px;
  width: auto;
  filter: grayscale(1) invert(1) brightness(1.6);
}
.affil-fallback {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.footer-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 14px;
}
.site-footer address {
  font-style: normal;
  color: var(--dust);
  line-height: 1.7;
  font-size: 0.9375rem;
}
.site-footer a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,252,247,.35);
}
.site-footer a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.footer-fine { color: var(--taupe); font-size: 0.8125rem; }

.footer-bottom {
  border-top: 1px solid rgba(250,247,242,.1);
  padding: 20px 0;
  color: var(--taupe);
  font-size: 0.8125rem;
}

/* ============================================================
   PROCESS — numbered 3-step "how it works"
   ============================================================ */
.process-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: process;
}
@media (min-width: 768px) {
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}
.process-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--clay);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 8px;
}
.process-step h3 {
  font-size: 1.375rem;
  margin: 0 0 4px;
}
.process-step p {
  color: var(--taupe);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 48ch;
}

/* ============================================================
   TESTIMONIALS — 3-card social-proof grid
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.testimonial {
  background: var(--bone);
  border: 1px solid var(--dust);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: 0;
  left: 20px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 5rem;
  line-height: 1;
  color: var(--clay);
  opacity: 0.25;
  pointer-events: none;
}
.testimonial blockquote {
  margin: 0;
  position: relative;
}
.testimonial blockquote p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}
.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--dust);
  margin-top: auto;
}
.testimonial-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}
.testimonial-meta {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--taupe);
}

/* ============================================================
   Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-slide { transition: opacity 0s; }
}

/* Focus visibility — keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
