/* The location choice sits in the reflecting pool, separate from the primary CTA. */
.region-switch {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: clamp(22px, 3.5vh, 36px);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f2f0eb;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.region-switch__prompt {
  margin-bottom: 2px;
  color: rgba(242, 240, 235, 0.72);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.region-switch__options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 30px);
}

.region-switch__option {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 0 5px;
  color: rgba(242, 240, 235, 0.7);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

.region-switch__option::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: #e8b46a;
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  transition: opacity 180ms var(--ease-out), transform 240ms var(--ease-out);
}

.region-switch__option:focus-visible,
.region-switch__option.is-current { color: #fff; }

@media (hover: hover) and (pointer: fine) {
  .region-switch__option:hover { color: #fff; }
}

.region-switch__option.is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.region-switch__option.is-pending { color: #e8b46a; }
.region-switch__option.is-pending::after {
  opacity: 0.55;
  transform: scaleX(0.55);
}

.region-switch.is-loading .region-switch__option { cursor: progress; }

.region-switch__option:focus-visible {
  outline: 1px solid #e8b46a;
  outline-offset: 5px;
}

.region-switch.is-switching .region-switch__option:not(.is-current) { pointer-events: none; }

/* The destination house is placed over the existing photograph; the copy stays put. */
.region-scene {
  position: absolute;
  z-index: 5;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 850ms var(--ease-out);
}

.region-scene.is-visible { opacity: 1; }

.region-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 62%;
}

.region-scene--south img { object-position: 50% 62%; }

.region-scene__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 27% at 50% 38%, rgba(222, 225, 227, 0.8) 0%, rgba(222, 225, 227, 0.62) 42%, rgba(222, 225, 227, 0) 100%),
    radial-gradient(ellipse 52% 44% at 50% 30%, rgba(226, 228, 229, 0.45) 0%, rgba(226, 228, 229, 0) 100%),
    linear-gradient(180deg, rgba(226, 228, 229, 0.35) 0%, rgba(226, 228, 229, 0) 16%),
    var(--hero-fade);
}

.region-scene--south .region-scene__scrim {
  background: linear-gradient(180deg, rgba(225, 225, 223, 0.08), transparent 54%), var(--hero-fade);
}

@media (max-width: 700px) {
  .region-scene--north .region-scene__scrim {
    background:
      radial-gradient(ellipse 72% 24% at 50% 37%, rgba(222, 225, 227, 0.82) 0%, rgba(222, 225, 227, 0.64) 48%, rgba(222, 225, 227, 0) 100%),
      radial-gradient(ellipse 80% 40% at 50% 28%, rgba(226, 228, 229, 0.45) 0%, rgba(226, 228, 229, 0) 100%),
      linear-gradient(180deg, rgba(226, 228, 229, 0.35) 0%, rgba(226, 228, 229, 0) 16%),
      var(--hero-fade);
  }
}

@media (max-width: 600px) {
  .region-switch { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .region-switch__options { gap: 16px; }
  .region-switch__option { font-size: 0.8125rem; }
}

@media (max-width: 370px) {
  .region-switch__options { gap: 10px; }
  .region-switch__option { font-size: 0.75rem; }
}

@media (max-width: 600px) and (max-height: 720px) {
  /* Keep the copy in clear sky on short phones in both regions. */
  .hero { padding-top: 76px; }
  .hero-intro { margin-top: 12px; }
  .hero-intro p { font-size: 1rem; line-height: 1.4; }
  .hero-intro .hero-scope { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .region-scene { transition-duration: 120ms; }
  .region-switch__option,
  .region-switch__option::after { transition-duration: 120ms; }
}
