:root {
  --blue: #38b6ff;
  --white: #ffffff;
  --text: #222222;
  --header-height: 64px;
}
* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: #f4f4f4;
}
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 3vw, 44px);
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(34,34,34,.12);
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.site-name {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.site-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
}
.site-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .18s ease, color .18s ease;
}
.site-menu a:hover,
.site-menu a:focus-visible { color: #0079bd; transform: translateY(-2px); }
.menu-button {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
}
.menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  border-radius: 99px;
  background: #111;
}
.viewport-stage {
  min-min-height: 100svh;
  padding: calc(var(--header-height) + 16px) 16px 16px;
  display: grid;
  place-items: center;
}
.hero-card {
  position: relative;
  width: min(calc((100svh - var(--header-height) - 32px) * 16 / 9), calc(100vw - 32px));
  aspect-ratio: 16 / 9;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--blue);
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}
.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, outline .18s ease;
}
.hotspot:hover,
.hotspot:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
  outline: 3px solid rgba(255,255,255,.85);
}
.hotspot-search {
  left: 4.32%;
  top: 84.91%;
  width: 19.48%;
  height: 10.19%;
}
.hotspot-value {
  left: 26.61%;
  top: 84.91%;
  width: 19.48%;
  height: 10.19%;
}
@media (max-width: 1040px) {
  .menu-button { display: block; }
  .site-menu {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    right: 14px;
    width: min(320px, calc(100vw - 28px));
    padding: 14px;
    display: grid;
    gap: 4px;
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 46px rgba(0,0,0,.22);
    transform: translateY(-12px) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .site-menu.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .site-menu a { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
  .site-menu a:hover, .site-menu a:focus-visible { background: rgba(56,182,255,.14); transform: none; }
}
@media (max-width: 520px) {
  :root { --header-height: 58px; }
  .site-header { padding-inline: 12px; }
  .site-name { font-size: 14px; }
  .menu-button { width: 40px; height: 40px; }
  .viewport-stage { padding: calc(var(--header-height) + 10px) 8px 10px; }
  .hero-card {
    width: min(calc((100svh - var(--header-height) - 20px) * 16 / 9), calc(100vw - 16px));
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* New Construction page hotspots */
.nc-videos {
  left: 4.35%;
  top: 87.15%;
  width: 20.25%;
  height: 10.55%;
}
.nc-books {
  left: 26.32%;
  top: 87.15%;
  width: 20.25%;
  height: 10.55%;
}
.nc-builders {
  left: 48.05%;
  top: 87.15%;
  width: 20.25%;
  height: 10.55%;
}

/* Books page hotspots */
.book-one {
  left: 7.25%;
  top: 49.65%;
  width: 18.15%;
  height: 44.65%;
  border-radius: 0;
}
.book-two {
  left: 29.05%;
  top: 49.65%;
  width: 18.15%;
  height: 44.65%;
  border-radius: 0;
}

/* Buying & Selling landing page hotspots */
.bs-buy {
  left: 2.86%;
  top: 86.20%;
  width: 19.48%;
  height: 10.19%;
}
.bs-sell {
  left: 24.43%;
  top: 86.20%;
  width: 19.74%;
  height: 10.19%;
}
.bs-investor {
  left: 45.99%;
  top: 86.20%;
  width: 19.48%;
  height: 10.19%;
}


/* Final scroll override */
html,
body {
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.viewport-stage,
.page-stage,
main {
  min-height: 100svh;
  height: auto !important;
}


/* Land landing-page hotspots, aligned exactly over the three Canva buttons */
.land-residential {
  left: 4.74%;
  top: 86.76%;
  width: 19.48%;
  height: 10.19%;
}

.land-horse {
  left: 25.89%;
  top: 86.76%;
  width: 19.53%;
  height: 10.65%;
}

.land-investment {
  left: 47.03%;
  top: 86.76%;
  width: 19.48%;
  height: 10.19%;
}


/* Southern Arizona landing-page hotspot */
.sa-explore {
  left: 12.04%;
  top: 84.92%;
  width: 19.90%;
  height: 10.38%;
}

/* Featured Areas card hotspots */
.area-card {
  border-radius: 0;
}

.area-tucson {
  left: 0.77%;
  top: 37.24%;
  width: 23.75%;
  height: 29.54%;
}

.area-catalina {
  left: 25.65%;
  top: 37.24%;
  width: 23.75%;
  height: 29.54%;
}

.area-valencia {
  left: 50.55%;
  top: 37.24%;
  width: 23.75%;
  height: 29.54%;
}

.area-marana {
  left: 75.45%;
  top: 37.24%;
  width: 23.75%;
  height: 29.54%;
}

.area-vail {
  left: 0.77%;
  top: 68.35%;
  width: 23.75%;
  height: 29.54%;
}

.area-sahuarita {
  left: 25.65%;
  top: 68.35%;
  width: 23.75%;
  height: 29.54%;
}

.area-oro {
  left: 50.55%;
  top: 68.35%;
  width: 23.75%;
  height: 29.54%;
}

.area-tubac {
  left: 75.45%;
  top: 68.35%;
  width: 23.75%;
  height: 29.54%;
}


/* Distressed Properties landing-page hotspots */
.distressed-homeowners {
  left: 3.28%;
  top: 86.95%;
  width: 19.48%;
  height: 10.19%;
}

.distressed-buyers {
  left: 24.76%;
  top: 86.95%;
  width: 19.48%;
  height: 10.19%;
}


/* Giving Back page button hotspot */
.giving-back-sanctuary {
  left: 12.71%;
  top: 83.33%;
  width: 19.53%;
  height: 13.33%;
}


/* FINAL SITE NAVIGATION, SCROLLING, BACK LINKS, AND CONTACT */
html,
body {
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  padding-top: var(--header-height);
}

.site-header {
  top: 0;
}

.menu-button {
  display: block !important;
  margin-left: auto;
}

.site-menu {
  position: fixed !important;
  top: calc(var(--header-height) + 10px) !important;
  right: 16px !important;
  width: min(330px, calc(100vw - 32px)) !important;
  padding: 14px !important;
  display: grid !important;
  gap: 4px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.99) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.22) !important;
  transform: translateY(-12px) scale(.98) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .18s ease, transform .18s ease !important;
  z-index: 50 !important;
}

.site-menu.is-open {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.site-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  background: #eef8ff;
}

.viewport-stage {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  height: auto !important;
  padding: 48px 16px 24px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible !important;
}

.hero-card {
  flex: 0 0 auto;
  overflow: hidden !important;
}

.back-link {
  position: absolute;
  top: 10px;
  left: max(16px, calc((100vw - min(calc((100svh - var(--header-height) - 32px) * 16 / 9), calc(100vw - 32px))) / 2));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #111;
  background: rgba(255,255,255,.96);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-2px);
}

/* Giving Back button: precisely aligned with the visible Canva button. */
.giving-back-sanctuary {
  left: 12.65% !important;
  top: 83.15% !important;
  width: 19.70% !important;
  height: 13.60% !important;
}

/* Contact hotspots. */
.contact-phone {
  left: 2.75%;
  top: 63.25%;
  width: 27%;
  height: 6.3%;
}

.contact-email {
  left: 2.75%;
  top: 69.40%;
  width: 35%;
  height: 6.3%;
}

.contact-calendar {
  left: 2.75%;
  top: 75.55%;
  width: 38%;
  height: 6.3%;
}

.social-links {
  width: min(900px, calc(100vw - 32px));
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 22px 0 10px;
}

.social-links a {
  min-width: 160px;
  padding: 14px 24px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .site-header {
    padding: 0 14px;
  }

  .site-name {
    font-size: 15px;
  }

  .viewport-stage {
    padding: 48px 8px 22px;
  }

  .hero-card {
    width: calc(100vw - 16px);
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .back-link {
    left: 12px;
    top: 8px;
  }

  .social-links {
    flex-direction: column;
    width: calc(100vw - 32px);
  }

  .social-links a {
    width: 100%;
  }
}


/* STEP 1: Continuous scrolling homepage */
html {
  scroll-behavior: smooth;
}

.scrolling-home {
  padding-top: var(--header-height);
}

.scroll-section {
  min-height: calc(100svh - var(--header-height));
  padding: 18px 16px;
  display: grid;
  place-items: center;
  scroll-margin-top: var(--header-height);
}

.scroll-section .hero-card {
  width: min(calc((100svh - var(--header-height) - 36px) * 16 / 9), calc(100vw - 32px));
  aspect-ratio: 16 / 9;
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .scroll-section {
    min-height: auto;
    padding: 12px 8px;
  }

  .scroll-section .hero-card {
    width: calc(100vw - 16px);
  }
}


/* MOBILE LAYOUT FIX */
@media (max-width: 700px) {
  :root {
    --header-height: 58px;
  }

  body {
    padding-top: var(--header-height);
    background: #f3f3f3;
  }

  .site-header {
    height: var(--header-height);
    padding: 0 12px;
  }

  .site-name {
    font-size: 15px;
    line-height: 1;
  }

  .menu-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .scrolling-home {
    padding-top: 0;
  }

  .scroll-section {
    width: 100%;
    min-height: 0 !important;
    padding: 10px 0 18px;
    display: block !important;
    scroll-margin-top: var(--header-height);
  }

  .scroll-section:first-child {
    padding-top: 0;
  }

  .scroll-section .hero-card,
  .viewport-stage .hero-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .scroll-section .hero-image,
  .viewport-stage .hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .viewport-stage {
    width: 100%;
    min-height: 0 !important;
    padding: 46px 0 18px !important;
    display: block !important;
    overflow: visible !important;
  }

  .back-link {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 10px;
    z-index: 25;
    font-size: 12px;
    padding: 7px 11px;
  }

  .social-links {
    width: calc(100vw - 24px);
    margin: 0 auto;
    padding: 16px 0 6px;
    gap: 10px;
  }

  .social-links a {
    min-width: 0;
    width: 100%;
    padding: 12px 18px;
  }

  .site-menu {
    top: calc(var(--header-height) + 8px) !important;
    right: 10px !important;
    width: min(310px, calc(100vw - 20px)) !important;
  }
}


/* RESPONSIVE FEATURED AREAS PAGE */
.featured-page {
  min-height: 100svh;
  padding: calc(var(--header-height) + 64px) clamp(16px, 3vw, 44px) 48px;
  background: #38b6ff;
}

.featured-back {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  left: 18px;
}

.featured-heading {
  max-width: 1500px;
  margin: 0 auto 26px;
  color: #fff;
}

.featured-heading h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 88px);
  line-height: .95;
  text-transform: uppercase;
  text-shadow: 0 5px 12px rgba(0,0,0,.22);
}

.featured-subtitle {
  margin: 10px 0 26px;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
  text-transform: uppercase;
}

.featured-intro {
  max-width: 980px;
  margin: 0;
  font-size: clamp(17px, 1.6vw, 26px);
  line-height: 1.45;
  font-weight: 700;
}

.featured-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.featured-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 10px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  transition: transform .18s ease, box-shadow .18s ease;
}

.featured-card img {
  display: block;
  width: 100%;
  height: auto;
}

.featured-card:hover,
.featured-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
  outline: 3px solid rgba(255,255,255,.9);
}

@media (max-width: 1050px) {
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .featured-page {
    padding: calc(var(--header-height) + 58px) 12px 28px;
  }

  .featured-back {
    top: calc(var(--header-height) + 8px);
    left: 10px;
  }

  .featured-heading {
    margin-bottom: 18px;
  }

  .featured-heading h1 {
    font-size: 42px;
  }

  .featured-subtitle {
    margin: 7px 0 16px;
    font-size: 21px;
  }

  .featured-intro {
    font-size: 16px;
    line-height: 1.45;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .featured-card {
    border-width: 7px;
    border-radius: 4px;
  }
}


/* RESPONSIVE AREA DETAIL PAGE */
.area-detail-page {
  min-height: 100svh;
  padding: calc(var(--header-height) + 64px) clamp(18px, 3vw, 52px) 54px;
  background: #38b6ff;
  color: #fff;
}

.area-detail-back {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  left: 18px;
}

.area-detail-heading {
  max-width: 1500px;
  margin: 0 auto 30px;
  padding: 0 0 18px;
  border-bottom: 2px solid rgba(255,255,255,.9);
}

.area-detail-heading h1 {
  margin: 0;
  font-size: clamp(52px, 7vw, 104px);
  line-height: .95;
  text-transform: uppercase;
  text-shadow: 0 5px 12px rgba(0,0,0,.22);
}

.area-detail-heading p {
  margin: 12px 0 0;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 800;
  text-transform: uppercase;
}

.area-detail-layout {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  gap: clamp(28px, 4vw, 70px);
  align-items: center;
}

.area-detail-copy {
  min-width: 0;
}

.area-detail-intro {
  margin: 0 0 38px;
  font-size: clamp(18px, 1.65vw, 28px);
  line-height: 1.45;
  font-weight: 700;
}

.area-glance h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 44px);
  text-transform: uppercase;
}

.area-glance ul {
  margin: 0;
  padding-left: 1.35em;
}

.area-glance li {
  margin: 0 0 14px;
  font-size: clamp(17px, 1.45vw, 24px);
  line-height: 1.35;
}

.area-glance li strong,
.area-glance li span {
  display: block;
}

.area-glance li strong {
  font-weight: 800;
}

.area-glance li span {
  font-weight: 500;
}

.area-detail-image {
  margin: 0;
  padding: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
}

.area-detail-image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .area-detail-layout {
    grid-template-columns: 1fr;
  }

  .area-detail-image {
    order: -1;
  }
}

@media (max-width: 700px) {
  .area-detail-page {
    padding: calc(var(--header-height) + 58px) 14px 34px;
  }

  .area-detail-back {
    top: calc(var(--header-height) + 8px);
    left: 10px;
  }

  .area-detail-heading {
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .area-detail-heading h1 {
    font-size: 44px;
  }

  .area-detail-heading p {
    font-size: 20px;
    line-height: 1.15;
  }

  .area-detail-layout {
    gap: 20px;
  }

  .area-detail-image {
    padding: 7px;
  }

  .area-detail-intro {
    margin-bottom: 24px;
    font-size: 17px;
    line-height: 1.5;
  }

  .area-glance h2 {
    font-size: 28px;
  }

  .area-glance li {
    font-size: 16px;
    margin-bottom: 12px;
  }
}


/* TRUE MOBILE STACKING FOR THE 8 MAIN HOMEPAGE SECTIONS */
.mobile-stack,
.mobile-social-links {
  display: none;
}

@media (max-width: 700px) {
  .scroll-section > .hero-card {
    display: none !important;
  }

  .scroll-section {
    padding: 0 0 20px !important;
    background: #38b6ff;
  }

  .mobile-stack {
    display: block;
    width: 100%;
  }

  .mobile-panel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #38b6ff;
  }

  .mobile-panel img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-hotspot {
    position: absolute;
    z-index: 3;
    display: block;
    border-radius: 999px;
  }

  .mobile-hotspot:focus-visible {
    outline: 3px solid rgba(255,255,255,.95);
  }

  /* Home buttons */
  .mh-home-search { left: 7.7%; top: 84.9%; width: 34.6%; height: 10.2%; }
  .mh-home-value  { left: 47.3%; top: 84.9%; width: 34.6%; height: 10.2%; }

  /* New Construction buttons */
  .mh-nc-videos   { left: 5.1%; top: 84.9%; width: 28.7%; height: 10.2%; }
  .mh-nc-books    { left: 36.7%; top: 84.9%; width: 28.7%; height: 10.2%; }
  .mh-nc-builders { left: 68.4%; top: 84.9%; width: 28.7%; height: 10.2%; }

  /* Buy & Sell buttons */
  .mh-bs-buy      { left: 5.1%; top: 86.2%; width: 34.6%; height: 10.2%; }
  .mh-bs-sell     { left: 43.4%; top: 86.2%; width: 35.1%; height: 10.2%; }
  .mh-bs-investor { left: 81.8%; top: 86.2%; width: 34.6%; height: 10.2%; transform: translateX(-50%); }

  /* Land buttons */
  .mh-land-residential { left: 8.4%; top: 86.8%; width: 34.6%; height: 10.2%; }
  .mh-land-horse       { left: 46.0%; top: 86.8%; width: 34.7%; height: 10.7%; }
  .mh-land-investment  { left: 83.6%; top: 86.8%; width: 34.6%; height: 10.2%; transform: translateX(-50%); }

  /* Southern Arizona */
  .mh-sa-explore { left: 21.4%; top: 84.9%; width: 35.4%; height: 10.4%; }

  /* Distressed Properties */
  .mh-distressed-homeowners { left: 5.8%; top: 87.0%; width: 34.6%; height: 10.2%; }
  .mh-distressed-buyers     { left: 44.0%; top: 87.0%; width: 34.6%; height: 10.2%; }

  /* Giving Back */
  .mh-giving-back { left: 22.5%; top: 83.2%; width: 35.0%; height: 13.6%; }

  /* Contact */
  .mh-contact-phone    { left: 4.9%; top: 63.3%; width: 48.0%; height: 6.3%; }
  .mh-contact-email    { left: 4.9%; top: 69.4%; width: 62.2%; height: 6.3%; }
  .mh-contact-calendar { left: 4.9%; top: 75.6%; width: 67.5%; height: 6.3%; }

  .mobile-social-links {
    display: grid;
    gap: 10px;
    padding: 14px 14px 0;
    background: #38b6ff;
  }

  .mobile-social-links a {
    display: block;
    padding: 14px 18px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(0,0,0,.15);
  }
}
